-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.config.js
53 lines (52 loc) · 2 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
41
42
43
44
45
46
47
48
49
50
51
52
53
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
var path = require('path');
module.exports = {
entry: './TempleApp.js',
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'app.bundle.js'
},
module: {
rules:
[
{ // sass and postcss at the end
test: /\.(scss|css)$/,
exclude: /plyr\.css$/, // see above
use: [
MiniCssExtractPlugin.loader,
{
loader: 'css-loader'
}, {
loader: 'postcss-loader',
options: {
postcssOptions: {
config: path.join(__dirname, './postcss.config.js')
}
}
}, {
loader: 'sass-loader',
options: {
sassOptions: {
quietDeps: true,
includePaths: [
'node_modules'
]
}
}
}]
},
{
// generate css files without sass-loader + postcss-loader (see below) to avoid issues with dart sass and plyr:
// https://github.com/sampotts/plyr/issues/2323
// as well as plyr and postcsss: https://github.com/sampotts/plyr/issues/2182#issuecomment-889630296
test: /plyr\.css$/,
// exclude: /node_modules\/(plyr)\/.*/,
use: [
MiniCssExtractPlugin.loader,
{
loader: 'css-loader'
}]
}
]
},
};