運(yùn)行$ webpack hello.js hello.bundle.js --module-bind 'css=style-loader!css-loader!'
ERROR in ./hello.js
Module not found: Error: Can't resolve '' in 'E:\webpack\webpack-test'@ ./hello.js 2:0-22
ERROR in ./hello.js
Module not found: Error: Can't resolve '' in 'E:\webpack\webpack-test'@ ./hello.js 2:0-22
2017-02-25
果然666,我自己的webpack真的只是一點(diǎn)皮毛,只是了解一點(diǎn)api的使用,真是不知道天高地厚
2017-02-25
講師回答 / qbaty
You need to specify 'babel-loader' instead of 'babel'.?他這里說了,你用的是什么版本?
1.postcss.config.js
module.exports = {
plugins: [
require('autoprefixer')({ browsers: ["last 5 versions"] })
]
}
2.webpack.config.js
module:{
rules:[
...
{test:/\.css$/,use:['style-loader', 'css-loader','postcss-loader']}]},
module.exports = {
plugins: [
require('autoprefixer')({ browsers: ["last 5 versions"] })
]
}
2.webpack.config.js
module:{
rules:[
...
{test:/\.css$/,use:['style-loader', 'css-loader','postcss-loader']}]},
2017-02-24
webpack hello.js hello.bundle.js --module-bind "css=style-loader!css-loader"
正解。切記是雙引號
正解。切記是雙引號
2017-02-24
webpack + angular 搭建的延遲加載 和 本地mock ,歡迎分享https://github.com/Topthinking/angular-webpack
2017-02-24