diff --git a/.gitignore b/.gitignore index 3800038..2556e62 100644 --- a/.gitignore +++ b/.gitignore @@ -27,4 +27,4 @@ build/Release node_modules # Auto-generated by npm install / webpack. -promise_client.js +promise.bundle.js diff --git a/promise_client.js b/promise_client.js new file mode 100644 index 0000000..6c7d1ca --- /dev/null +++ b/promise_client.js @@ -0,0 +1,4 @@ +var global = Function("return this")(); +if (typeof global.Promise !== "function") { + global.Promise = require("promise"); +} diff --git a/webpack.config.js b/webpack.config.js index 738aad1..6849dfd 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,10 +1,8 @@ module.exports = { context: __dirname, - entry: "promise", + entry: "./promise_client.js", output: { - library: "Promise", - libraryTarget: "this", path: __dirname, - filename: "promise_client.js" + filename: "promise.bundle.js" } };