-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
32 lines (30 loc) · 781 Bytes
/
webpack.config.js
File metadata and controls
32 lines (30 loc) · 781 Bytes
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
const CopyPlugin = require('copy-webpack-plugin');
const fs_path_resolve = require('./src/fs_path_resolve');
const pkg = require('./package.json');
const webpack = require('webpack');
const dev = {
mode: 'development',
target: 'web',
entry: './src/browser/index.js',
devtool: false,
output: {
path: fs_path_resolve(__dirname, 'dist'),
filename: 'browser.js',
},
externals: {
axios: 'axios',
bluebird: 'Promise',
'form-data': 'FormData',
},
plugins: [
new webpack.DefinePlugin({
__VERSION__: JSON.stringify(pkg.version),
}),
new CopyPlugin({
patterns: [
'dist.templ/index.html',
],
}),
],
};
module.exports = [dev];