forked from jinkin1995/vue-json-edit
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathwebpack.config.js
38 lines (33 loc) · 858 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
32
33
34
35
36
37
38
const webpack = require('webpack');
const config = require('./webpack.base.config');
const path = require('path');
const MinifyPlugin = require("babel-minify-webpack-plugin");
config.entry = './example/main.js';
config.output = {
path: path.resolve(__dirname, './dist/'),
// publicPath: '',
filename: 'json-textarea.js',
library: 'JSONTextArea',
libraryTarget: 'umd',
};
// config.devtool = 'source-map';
config.plugins = (config.plugins || []).concat([
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringify('production'),
},
}),
new MinifyPlugin({}, {
sourceMap: false,
compress: {
warnings: false,
},
comments: false,
})
]);
config.resolve = {
alias: {
vue$: 'vue/dist/vue.esm.js',
},
};
module.exports = config;