|
@@ -9,7 +9,12 @@ module.exports = {
|
|
path: path.resolve(__dirname, 'dist'),
|
|
path: path.resolve(__dirname, 'dist'),
|
|
filename: '[name].js',
|
|
filename: '[name].js',
|
|
libraryTarget: 'umd',
|
|
libraryTarget: 'umd',
|
|
- library: 'BABYLON.GUI',
|
|
|
|
|
|
+ library: {
|
|
|
|
+ root: ["BABYLON", "GUI"],
|
|
|
|
+ amd: "babylonjs-gui",
|
|
|
|
+ commonjs: "babylonjs-gui"
|
|
|
|
+ },
|
|
|
|
+ //globalObject: "BABYLON",
|
|
umdNamedDefine: true,
|
|
umdNamedDefine: true,
|
|
devtoolModuleFilenameTemplate: '[relative-resource-path]'
|
|
devtoolModuleFilenameTemplate: '[relative-resource-path]'
|
|
},
|
|
},
|
|
@@ -22,11 +27,14 @@ module.exports = {
|
|
externals: {
|
|
externals: {
|
|
babylonjs: true
|
|
babylonjs: true
|
|
},
|
|
},
|
|
- devtool: 'source-map',
|
|
|
|
plugins: [
|
|
plugins: [
|
|
new webpack.WatchIgnorePlugin([
|
|
new webpack.WatchIgnorePlugin([
|
|
/\.d\.ts$/
|
|
/\.d\.ts$/
|
|
- ])
|
|
|
|
|
|
+ ]),
|
|
|
|
+ // fixing a small issue when root is an array and not a string
|
|
|
|
+ new webpack.SourceMapDevToolPlugin({
|
|
|
|
+ namespace: "BABYLON.GUI"
|
|
|
|
+ })
|
|
],
|
|
],
|
|
module: {
|
|
module: {
|
|
rules: [{ test: /\.tsx?$/, loader: "ts-loader", exclude: /node_modules/ }]
|
|
rules: [{ test: /\.tsx?$/, loader: "ts-loader", exclude: /node_modules/ }]
|