chillaxyw

1.是webpack 4 后,很多插件都要升级

DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
(node:5080) DeprecationWarning: Tapable.apply is deprecated. Call apply on the plugin directly instead                              70% building 37/37 modules 0 activeE:\code\node\vue\my-project\node_modules\html-webpack-plugin\lib\compiler.js:81
        var outputName = compilation.mainTemplate.applyPluginsWaterfall(\'asset-path\', outputOptions.filename,

 vue-loader 升级后需要 vueLoaderPlugin 

2.使用viewport  一定要写user-scalable=no ,如果不写的话,如果页面有横向超出的部分(如文字未换行超出),页面会自动缩小来适应屏幕的框,会使页面变形(页面宽度会自动变大来适应)

如下:

如果加上会正常

wepack 报错:TypeError: __webpack_require__(...) is not a function  很可能是babel 转换时 将插件中的js也转换了。

test:/\.js$/,一定要制定js范围,include :include: [resolve(\'src\'), resolve(\'test\'), resolve(\'node_modules/webpack-dev-server/client\')]

 

分类:

技术点:

相关文章:

  • 2021-05-09
  • 2021-10-04
  • 2021-12-18
  • 2021-08-08
  • 2022-01-02
  • 2021-12-04
  • 2021-10-15
  • 2021-08-25
猜你喜欢
  • 2021-09-11
  • 2021-06-15
  • 2021-05-16
  • 2021-10-24
  • 2021-12-18
  • 2021-10-03
  • 2021-10-15
相关资源
相似解决方案