forked from agussuroyo/wp-api-swaggerui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
32 lines (30 loc) · 855 Bytes
/
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
const path = require('path');
const config = require('@wordpress/scripts/config/webpack.config');
const iewp = require('ignore-emit-webpack-plugin');
const ocawp = require('optimize-css-assets-webpack-plugin');
module.exports = {
...config,
entry: {
'js/app': './resources/js/app.js',
'css/app': './resources/sass/app.scss',
},
output: {
...config.output,
path: path.resolve(__dirname, 'assets'),
},
plugins: [
...config.plugins,
new iewp(['css/app.js'])
],
optimization: {
...config.optimization,
minimizer: [
...config.optimization.minimizer,
new ocawp({
cssProcessorPluginOptions: {
preset: ['default', {discardComments: {removeAll: true}}],
}
})
]
}
};