adjust webpack config to exclude node modules

This commit is contained in:
Florian Dold 2017-05-29 02:44:28 +02:00
parent 5b90311bef
commit 3f01c9490b
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B
3 changed files with 4 additions and 1 deletions

View File

@ -35,7 +35,7 @@ export function getLib() {
// Make sure that TypeScript doesn't try // Make sure that TypeScript doesn't try
// to check the taler-emscripten-lib. // to check the taler-emscripten-lib.
const indirectRequire = require; const indirectRequire = require;
const g = global as any; const g = global;
// unavoidable hack, so that emscripten detects // unavoidable hack, so that emscripten detects
// the environment as node even though importScripts // the environment as node even though importScripts
// is present. // is present.

View File

@ -27,6 +27,8 @@
*/ */
import URI = require("urijs"); import URI = require("urijs");
import * as wxApi from "./wxApi";
declare var cloneInto: any; declare var cloneInto: any;
const PROTOCOL_VERSION = 1; const PROTOCOL_VERSION = 1;

View File

@ -28,6 +28,7 @@ module.exports = function (env) {
}, },
plugins: [], plugins: [],
devtool: "source-map", devtool: "source-map",
externals: ["fs", "path", "child_process", /.*taler-emscripten-lib.*/],
} }
if (env.prod) { if (env.prod) {
base.plugins.push(new webpack.optimize.UglifyJsPlugin()); base.plugins.push(new webpack.optimize.UglifyJsPlugin());