-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebpack.config.js
39 lines (39 loc) · 1.24 KB
/
webpack.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
const nodeExternals = require('webpack-node-externals');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
target: 'node', // in order to ignore built-in modules like path, fs, etc.
externals: [nodeExternals()], // in order to ignore all modules in node_modules folder
entry: "./index.js",
output: {
path: __dirname,
filename: "dist/bundle.js"
},
module: {
rules: [{
test: /\.scss$/,
use: [{
loader: "style-loader"
}, {
loader: "css-loader"
}, {
loader: "sass-loader",
options: {
includePaths: ["src/sass/admin.scss", "dist/style.css"]
}
}]
}],
loaders: [
{ test: /\.css$/, loader: "style!css" },
{ test: /\.json$/, loader: 'json-loader' },
{ test: /\.(scss|sass|css)$/, loader: ExtractTextPlugin.extract({ fallback: 'style-loader', use: 'css-loader' }) },
{ test: /\.scss$/, loader: 'style!css!sass!sass-resources'}
]
},
plugins: [
new ExtractTextPlugin("[name].css")
],
node: {
console: true,
fs: "empty"
}
};