我是" webpack":" ^ 1.14.0"," css-loader":" ^ 0.26.1" " sass-loader":" ^ 4.1.1"
我看到了控制台错误
addStyles.js:147 Uncaught Error: Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.
at insertStyleElement (addStyles.js:147)
at createStyleElement (addStyles.js:184)
at addStyle (addStyles.js:251)
at addStylesToDom (addStyles.js:116)
at ../node_modules/style-loader/lib/addStyles.js.module.exports (addStyles.js:67)
at Object../prompt.css (prompt.css?d8f8:12)
at __webpack_require__ (bootstrap bbe7b5471983b5ec6c6f:19)
at Object../prompt.js (prompt.js:17)
at __webpack_require__ (bootstrap bbe7b5471983b5ec6c6f:19)
at Object.3 (prompt.js:696)
以下是我的webpack配置文件
let ExtractTextPlugin = require('extract-text-webpack-plugin');
{
test: /\.s?css$/,
loader: ExtractTextPlugin.extract("style-loader", "css-loader!postcss-loader")
},
plugins: [
new ExtractTextPlugin("css/styles.css", { allChunks: true })
]