forked from microsoft/ContosoAir
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
40 lines (39 loc) · 1.04 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
40
var path = require('path');
var MiniCssExtractPlugin = require("mini-css-extract-plugin");
module.exports = {
devtool: false,
entry: './front.js',
output: {
filename: 'js/main.js',
path: path.resolve(__dirname, 'public'),
},
resolve: {
extensions: ['.css', '.scss'],
},
module: {
rules: [
{
test: /\.s?css$/,
use: [
MiniCssExtractPlugin.loader,
{ loader: 'css-loader', options: { importLoaders: 1 } },
{
loader: 'postcss-loader',
options: {
ident: 'postcss',
plugins: [
require('autoprefixer')({add: true })
]
}
},
'sass-loader',
],
}
]
},
plugins: [
new MiniCssExtractPlugin({
filename: 'css/main.css',
})
]
};