我正在尝试使用Extract Text Webpack插件,但是我无法为已编译的sass文件生成新的css文件。
webpack.config.js
{
"name": "test",
"version": "1.0.0",
"description": "",
"main": "webpack.config.js",
"scripts": {
"dev": "webpack-dev-server"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"css-loader": "^0.28.9",
"extract-text-webpack-plugin": "^3.0.2",
"node-sass": "^4.7.2",
"sass-loader": "^6.0.6",
"style-loader": "^0.20.1",
"webpack": "^3.11.0",
"webpack-dev-server": "^2.11.1"
}
}
的package.json:
var css = require('../css/app.scss');
console.log("This is a test Hi from webpack !!!");
app.js:
val headers: List[HttpHeader]
答案 0 :(得分:1)
你的配置看起来不错,我是你错过了路径或忘记在index.html中加载css文件,或者你可能没有创建任何scss文件