-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.edit_card.js
53 lines (53 loc) · 1.04 KB
/
webpack.config.edit_card.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
43
44
45
46
47
48
49
50
51
52
53
const webpack = require('webpack');
var path = require('path');
module.exports = {
entry: ['./main.js','./main_edit.js'],
output: {
path: './',
filename: './dist/0.0.1/edit-card.min.js'
},
plugin: [
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringify('production')
}
})
],
externals: {
'react': 'React',
'react-dom': 'ReactDOM',
'../../lib/js/react-jsonschema-form': 'JSONSchemaForm',
'axios': 'axios'
},
node: {
net: 'empty',
tls: 'empty',
fs: 'empty'
},
module: {
loaders: [
{
test: /\.jsx?$/,
exclude: /node_modules/,
loader: 'babel',
query:
{
presets:['react']
}
},
{
test: /\.js$/,
loader: 'babel',
include: path.join(__dirname,'node_modules','url-regex')
},
{
test: /\.css$/,
loaders: ["style-loader", "css-loader", "sass-loader"]
},
{
test: /\.json$/,
loader: 'json-loader'
}
]
}
};