summaryrefslogtreecommitdiff
path: root/webpack.config.js
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-05-30 14:38:29 +0200
committerFlorian Dold <florian.dold@gmail.com>2017-05-30 14:38:29 +0200
commit29908d5ef687c53153bde17856e4d8103bc0ad7b (patch)
treee0bb41c0d7283f2ef497dfaffd2656fbfe501b49 /webpack.config.js
parentb1f0d6ac523af08ed4d8521b19aee4ce6c173b49 (diff)
downloadwallet-core-29908d5ef687c53153bde17856e4d8103bc0ad7b.tar.gz
wallet-core-29908d5ef687c53153bde17856e4d8103bc0ad7b.tar.bz2
wallet-core-29908d5ef687c53153bde17856e4d8103bc0ad7b.zip
paths, multi env and webpack config
Diffstat (limited to 'webpack.config.js')
-rw-r--r--webpack.config.js13
1 files changed, 12 insertions, 1 deletions
diff --git a/webpack.config.js b/webpack.config.js
index d86379d57..cc17ad4de 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -3,6 +3,14 @@ const webpack = require('webpack');
const merge = require('webpack-merge');
+function externalsCb(context, request, callback) {
+ if (/.*taler-emscripten-lib.*/.test(request)) {
+ callback(null, "undefined");
+ return;
+ }
+ callback();
+}
+
module.exports = function (env) {
env = env || {};
const base = {
@@ -28,7 +36,10 @@ module.exports = function (env) {
},
plugins: [],
devtool: "source-map",
- externals: ["fs", "path", "child_process", /.*taler-emscripten-lib.*/],
+ externals: [
+ externalsCb,
+ "child_process",
+ ],
}
if (env.prod) {
base.plugins.push(new webpack.optimize.UglifyJsPlugin());