-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathwebpack.noserver.js
37 lines (35 loc) · 1.2 KB
/
webpack.noserver.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
let webpack = require('webpack');
const merge = require('webpack-merge');
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
const common = require('./webpack.common.js');
let path = require('path');
module.exports = merge.smart(common, {
entry: {
'app': [
'bootstrap-loader', // Loads Twitter Bootstrap
'./index.jsx',
], // Appʼs entry point
'visor': path.join(__dirname, '/_visor/containers/VisorApp.jsx'),
},
output: {
path: path.join(__dirname, '/doc/dist/demo'),
publicPath: '/', // This is used to generate URLs to e.g. images
filename: '[name]-bundle.min.js',
},
devtool: 'cheap-module-source-map',
// devtool: 'cheap-module-eval-source-map', // for dev in prod enviroment
/* externals: {
ediphy: 'ediphy_editor_params',
ediphy: 'ediphy_editor_json',
},*/
plugins: [
new webpack.optimize.OccurrenceOrderPlugin(),
new webpack.optimize.ModuleConcatenationPlugin(),
new webpack.DefinePlugin({
'process.env': {
'NODE_ENV': JSON.stringify('production'),
'DOC': JSON.stringify('doc'),
},
}),
],
});