aswi2020sebela-gitlab/website/webpack.config.js @ 91bca584
1 |
const path = require('path'); |
---|---|
2 |
const MiniCssExtractPlugin = require('mini-css-extract-plugin'); |
3 |
|
4 |
module.exports = [{ |
5 |
entry: { |
6 |
index: "./public/js/index.js", |
7 |
polyfills: './public/js/polyfills.js', |
8 |
},
|
9 |
optimization: { |
10 |
minimize: true |
11 |
},
|
12 |
output: { |
13 |
filename: '[name].bundle.js', |
14 |
path: path.resolve(__dirname, 'public/js'), |
15 |
library: 'js' |
16 |
},
|
17 |
}, { |
18 |
plugins: [new MiniCssExtractPlugin()], |
19 |
entry: { |
20 |
style: ['./public/css/style.scss'] |
21 |
},
|
22 |
optimization: { |
23 |
minimize: true |
24 |
},
|
25 |
output: { |
26 |
publicPath: '', |
27 |
path: path.resolve(__dirname, 'public/css') |
28 |
},
|
29 |
module: { |
30 |
rules: [ |
31 |
{
|
32 |
test: /\.scss$/, |
33 |
use: [ |
34 |
{ loader: 'style-loader' }, |
35 |
{ loader: MiniCssExtractPlugin.loader }, |
36 |
{ loader: 'css-loader' }, |
37 |
{
|
38 |
loader: 'postcss-loader', |
39 |
options: { |
40 |
postcssOptions: { |
41 |
plugins: [ |
42 |
[
|
43 |
"autoprefixer" |
44 |
],
|
45 |
],
|
46 |
},
|
47 |
},
|
48 |
},
|
49 |
{
|
50 |
loader: 'sass-loader' |
51 |
}
|
52 |
]
|
53 |
},
|
54 |
{
|
55 |
test: /\.(png|jp(e*)g|svg)(\?v=\d+\.\d+\.\d+)?$/, |
56 |
use: [ |
57 |
{
|
58 |
loader: 'file-loader', |
59 |
options: { |
60 |
name: '[name].[ext]', |
61 |
outputPath: 'img/' |
62 |
}
|
63 |
}
|
64 |
]
|
65 |
},
|
66 |
]
|
67 |
}
|
68 |
}
|
69 |
]
|
- « Předchozí
- 1
- …
- 11
- 12
- 13
- Další »