webpack使用loader 報(bào)錯(cuò)
怎么沒一個(gè)人報(bào)錯(cuò)的?。?!我心里苦??! 我一直都是 npm WARN babel-loader@7.0.0 requires a peer of webpack@2 but none was installed. npm WARN html-webpack-plugin@2.28.0 requires a peer of webpack@1 || ^2 || ^2.1.0-beta || ^2.2.0-rc but none was installed. 頁面中一直是: main.bundle.js:50 Uncaught SyntaxError: Unexpected token import
2019-08-30
npm WARN babel-loader@7.0.0 requires a peer of webpack@2 but none is installed. You must install peer dependencies yourself.
npm WARN extract-text-webpack-plugin@1.0.1 requires a peer of webpack@^1.9.11 but none is installed. You must
install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
2017-06-20
你用的是webpack@1吧?安裝webpack直接就是webpack@2(現(xiàn)在可能是@3了),直接npm install webpack --save-dev