全局安裝之后,敲webpack命令,出現(xiàn)如下
The CLI moved into a separate package: webpack-cli.
搞了半天,解決如下,換了另一個版本:
1:npm uninstall webpack -g
2:npm install webpack@1.13.2 -g
The CLI moved into a separate package: webpack-cli.
搞了半天,解決如下,換了另一個版本:
1:npm uninstall webpack -g
2:npm install webpack@1.13.2 -g
2018-02-27
The CLI moved into a separate package: webpack-cli.
Please install 'webpack-cli' in addition to webpack itself to use the CLI.
請問這是怎么回事
Please install 'webpack-cli' in addition to webpack itself to use the CLI.
請問這是怎么回事
2018-02-26
這里有個點需要注意下,就是new關鍵字是用來實例化一個對象的,并且后面跟的對象名需要首字母是大寫的,所以,在實例化的時候注意有沒有首字母大寫
2018-02-25
歡迎大家參考github上的項目https://github.com/BUPTlhuanyu/LabWebSite,這是一個基于webpack,vue,vue-loader,vue-router的實驗室網(wǎng)頁項目,項目正在更新和完善之中,包括css優(yōu)化,vue組件等等的優(yōu)化還在進行中,歡迎大家討論和批評指正,共同進步。
2018-02-23
打開HTML文件提示Uncaught ReferenceError: require is not defined
at hello.js:1
at hello.js:1
2018-02-10
使用chunks的時候如果報ERROR in Template execution failed: TypeError: Cannot read property 'entry' of undefined,如果html有script標簽就會報這個錯,即使注釋掉也不行,一定要刪除!!!
2018-02-09
Unknown argument: display-reason
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! webpack-demo@1.0.0 webpack: `webpack --config webpack.config.js --progress --display-modules --colors --display-reason`
npm ERR! Exit status 1
解決方案:把--display-reason加上s 變成 -display-reasons 就好了
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! webpack-demo@1.0.0 webpack: `webpack --config webpack.config.js --progress --display-modules --colors --display-reason`
npm ERR! Exit status 1
解決方案:把--display-reason加上s 變成 -display-reasons 就好了
2018-02-01
雖然我現(xiàn)在才學但是感覺我一個初學者都可以聽得很明白很清楚說明老師講的真的很不錯,雖然webpack更新的很快 但是在看視頻的同時配合官網(wǎng)去看自己去琢磨還是能夠很快的調(diào)整過來的,再次感謝,辛苦老師了。
2018-01-29
const path = require("path")
module.exports={
entry:path.join(__dirname,"src/script/main.js"),
output:{
filename:"bundle.js",
path:path.join(__dirname,"dist")
}
}
module.exports={
entry:path.join(__dirname,"src/script/main.js"),
output:{
filename:"bundle.js",
path:path.join(__dirname,"dist")
}
}
2018-01-29