Browse Source

Missing lodash lib in prod #20 (#21)

* mv externals from base to dev webpack config

* rm unnecessary plugins from base webpack config
pull/1/head
rozetko 6 years ago committed by GitHub
parent
commit
ec7c13b0a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 19
      build/webpack.base.conf.js
  2. 9
      build/webpack.dev.conf.js

19
build/webpack.base.conf.js

@ -1,7 +1,4 @@
const path = require('path');
const fs = require('fs');
const webpack = require('webpack');
function resolve(p) {
@ -21,22 +18,6 @@ module.exports = {
filename: "server.js",
path: resolve('dist')
},
externals: [
function(context, request, callback) {
if(request[0] == '.') {
callback();
} else {
callback(null, "require('" + request + "')");
}
}
],
plugins: [
new webpack.optimize.OccurrenceOrderPlugin(),
new webpack.HotModuleReplacementPlugin(),
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('development')
})
],
resolve: {
extensions: [".ts", ".js"]
},

9
build/webpack.dev.conf.js

@ -1,4 +1,13 @@
var base = require('./webpack.base.conf');
base.externals = [
function (context, request, callback) {
if (request[0] == '.') {
callback();
} else {
callback(null, "require('" + request + "')");
}
}
];
base.watch = true;
module.exports = base;
Loading…
Cancel
Save