forked from riophae/vue-treeselect
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dev.js
42 lines (33 loc) · 847 Bytes
/
dev.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
const { merge } = require('webpack-merge')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const { libraryTargetPlaceholder } = require('../../config').library
const utils = require('../utils')
const IS_ENABLE_SOURCE_MAP = true
module.exports = webpackConfig => merge(webpackConfig, {
mode: 'none',
output: {
filename: `vue-treeselect.${libraryTargetPlaceholder}.js`,
},
module: {
rules: [
{
test: /\.png$/,
type: 'asset'
},
utils.styleLoaders({
sourceMap: IS_ENABLE_SOURCE_MAP,
extract: true,
}),
],
},
devtool: IS_ENABLE_SOURCE_MAP ? 'source-map' : false,
plugins: [
new MiniCssExtractPlugin({
filename: 'vue-treeselect.css',
chunkFilename: '[id].css',
}),
],
optimization: {
flagIncludedChunks: true,
},
})