Ich habe versucht, Webpack für Sass (Kompilierung zu äußeren Datei. Nicht eine direkte Includind Sass zu einigen JS-Dateien). Es funktioniert irgendwie nicht, also von der Ausgabe werde ich Bundle.js erhalten und das ist alles, aber ich möchte äußere style.css habenWebpack kompiliert nicht Sass zu Outer-Datei
Ich weiß nicht, was ich falsch mache. Könnte mir bitte jemand helfen?
Ich überprüfte einige relative Themen, fand aber keine nützlichen Ratschläge.
Hier ist meine webpack conf
var ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
entry: "./entry.js",
output: {
path: __dirname,
filename: "bundle.js"
},
module: {
loaders: [
{
test: /\.scss$/,
loader: ExtractTextPlugin.extract('style', 'raw!sass')
}
]
},
plugins: [
new ExtractTextPlugin('style.css', {
allChunks: true
})
]
};
zeta.scss
@import "hamma";
html {
color: red;
&.blue {
color: black;
}
}
hamma.scss
html {
color: purple !important;
}
Dateistruktur
sehr einfachentry.js
zeta.scss
hamma.scss
webpack.config.
package.json
mein package.json
{
"name": "dsfsdfdsfds",
"version": "1.0.0",
"main": "entry.js",
"scripts": {
"test": "sdf"
},
"author": "",
"license": "ISC",
"description": "",
"devDependencies": {
"css-loader": "^0.26.0",
"extract-text-webpack-plugin": "^1.0.1",
"node-sass": "^3.13.0",
"sass-loader": "^4.0.2",
"style-loader": "^0.13.1",
"webpack": "^1.13.3"
}
}