adding globalObject

so it can be used within Node.js (though it doesn't do anything)
This commit is contained in:
Yotam Mann 2019-11-07 15:45:00 -05:00
parent a08ee7e4d7
commit 076bec5dab

View file

@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-var-requires */
const path = require("path");
const HtmlWebpackPlugin = require("html-webpack-plugin");
@ -15,7 +16,8 @@ const defaults = {
path: path.resolve(__dirname, "build"),
filename: "[name].js",
library: "Tone",
libraryTarget: "umd"
libraryTarget: "umd",
globalObject: "typeof self !== 'undefined' ? self : this",
},
resolve: {
extensions: [".ts", ".js"]