问答

vue项目配置ts后,没办法用extentions

作者:admin 2021-09-10 我要评论

本人自自己用webpack构建vue项目,然后加入ts,但是webpack没办法再配置extentions了,有大神知道为什么吗 ? ?wds?: Invalid configuration object. Webpack has...

在说正事之前,我要推荐一个福利:你还在原价购买阿里云、腾讯云、华为云服务器吗?那太亏啦!来这里,新购、升级、续费都打折,能够为您省60%的钱呢!2核4G企业级云服务器低至69元/年,点击进去看看吧>>>)

本人自自己用webpack构建vue项目,然后加入ts,但是webpack没办法再配置extentions了,有大神知道为什么吗
? ?wds?: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.

  • configuration has an unknown property 'extensions'. These properties are valid:
    object { amd?, bail?, cache?, context?, dependencies?, devServer?, devtool?, entry?, externals?, infrastructureLogging?, loader?, mode?, module?, name?, node?, optimization?, output?, parallelism?, performance?, plugins?, profile?, recordsInputPath?, recordsOutputPath?, recordsPath?, resolve?, resolveLoader?, serve?, stats?, target?, watch?, watchOptions? }
    For typos: please correct them.
    For loader options: webpack >= v2.0.0 no longer allows custom properties in configuration.

    Loaders should be updated to allow passing options via loader options in module.rules.
    Until loaders are updated one can use the LoaderOptionsPlugin to pass these options to the loader:
    plugins: [
      new webpack.LoaderOptionsPlugin({
        // test: /\.xxx$/, // may apply this only for some modules
        options: {
          extensions: …
        }
      })

版权声明:本文转载自网络,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。本站转载出于传播更多优秀技术知识之目的,如有侵权请联系QQ/微信:153890879删除

相关文章
  • vue项目配置ts后,没办法用extentions

    vue项目配置ts后,没办法用extentions

  • 根据所选的条件,将数组对象转化为符合

    根据所选的条件,将数组对象转化为符合

  • php try catch 的疑惑

    php try catch 的疑惑

  • 使用pykafka的时候消费者无法退出

    使用pykafka的时候消费者无法退出

腾讯云代理商
海外云服务器