diff --git a/modules/3d-tiles/bundle.js b/modules/3d-tiles/src/bundle.js similarity index 82% rename from modules/3d-tiles/bundle.js rename to modules/3d-tiles/src/bundle.js index 4a0e76d2a1..a81e63800a 100644 --- a/modules/3d-tiles/bundle.js +++ b/modules/3d-tiles/src/bundle.js @@ -1,5 +1,5 @@ /* global window, global */ -const moduleExports = require('./src'); +const moduleExports = require('./index'); const _global = typeof window === 'undefined' ? global : window; _global.loaders = _global.loaders || {}; diff --git a/modules/arrow/bundle.js b/modules/arrow/src/bundle.js similarity index 82% rename from modules/arrow/bundle.js rename to modules/arrow/src/bundle.js index 4a0e76d2a1..a81e63800a 100644 --- a/modules/arrow/bundle.js +++ b/modules/arrow/src/bundle.js @@ -1,5 +1,5 @@ /* global window, global */ -const moduleExports = require('./src'); +const moduleExports = require('./index'); const _global = typeof window === 'undefined' ? global : window; _global.loaders = _global.loaders || {}; diff --git a/modules/core/bundle.js b/modules/core/src/bundle.js similarity index 82% rename from modules/core/bundle.js rename to modules/core/src/bundle.js index 4a0e76d2a1..a81e63800a 100644 --- a/modules/core/bundle.js +++ b/modules/core/src/bundle.js @@ -1,5 +1,5 @@ /* global window, global */ -const moduleExports = require('./src'); +const moduleExports = require('./index'); const _global = typeof window === 'undefined' ? global : window; _global.loaders = _global.loaders || {}; diff --git a/modules/csv/bundle.js b/modules/csv/src/bundle.js similarity index 82% rename from modules/csv/bundle.js rename to modules/csv/src/bundle.js index 4a0e76d2a1..a81e63800a 100644 --- a/modules/csv/bundle.js +++ b/modules/csv/src/bundle.js @@ -1,5 +1,5 @@ /* global window, global */ -const moduleExports = require('./src'); +const moduleExports = require('./index'); const _global = typeof window === 'undefined' ? global : window; _global.loaders = _global.loaders || {}; diff --git a/modules/draco/bundle.js b/modules/draco/bundle.js deleted file mode 100644 index 4a0e76d2a1..0000000000 --- a/modules/draco/bundle.js +++ /dev/null @@ -1,7 +0,0 @@ -/* global window, global */ -const moduleExports = require('./src'); - -const _global = typeof window === 'undefined' ? global : window; -_global.loaders = _global.loaders || {}; - -module.exports = Object.assign(_global.loaders, moduleExports); diff --git a/modules/draco/src/bundle.js b/modules/draco/src/bundle.js new file mode 100644 index 0000000000..a81e63800a --- /dev/null +++ b/modules/draco/src/bundle.js @@ -0,0 +1,7 @@ +/* global window, global */ +const moduleExports = require('./index'); + +const _global = typeof window === 'undefined' ? global : window; +_global.loaders = _global.loaders || {}; + +module.exports = Object.assign(_global.loaders, moduleExports); diff --git a/modules/experimental/bundle.js b/modules/experimental/bundle.js deleted file mode 100644 index 4a0e76d2a1..0000000000 --- a/modules/experimental/bundle.js +++ /dev/null @@ -1,7 +0,0 @@ -/* global window, global */ -const moduleExports = require('./src'); - -const _global = typeof window === 'undefined' ? global : window; -_global.loaders = _global.loaders || {}; - -module.exports = Object.assign(_global.loaders, moduleExports); diff --git a/modules/experimental/src/bundle.js b/modules/experimental/src/bundle.js new file mode 100644 index 0000000000..a81e63800a --- /dev/null +++ b/modules/experimental/src/bundle.js @@ -0,0 +1,7 @@ +/* global window, global */ +const moduleExports = require('./index'); + +const _global = typeof window === 'undefined' ? global : window; +_global.loaders = _global.loaders || {}; + +module.exports = Object.assign(_global.loaders, moduleExports); diff --git a/modules/gltf/bundle.js b/modules/gltf/bundle.js deleted file mode 100644 index 4a0e76d2a1..0000000000 --- a/modules/gltf/bundle.js +++ /dev/null @@ -1,7 +0,0 @@ -/* global window, global */ -const moduleExports = require('./src'); - -const _global = typeof window === 'undefined' ? global : window; -_global.loaders = _global.loaders || {}; - -module.exports = Object.assign(_global.loaders, moduleExports); diff --git a/modules/gltf/src/bundle.js b/modules/gltf/src/bundle.js new file mode 100644 index 0000000000..a81e63800a --- /dev/null +++ b/modules/gltf/src/bundle.js @@ -0,0 +1,7 @@ +/* global window, global */ +const moduleExports = require('./index'); + +const _global = typeof window === 'undefined' ? global : window; +_global.loaders = _global.loaders || {}; + +module.exports = Object.assign(_global.loaders, moduleExports); diff --git a/modules/images/bundle.js b/modules/images/bundle.js deleted file mode 100644 index 4a0e76d2a1..0000000000 --- a/modules/images/bundle.js +++ /dev/null @@ -1,7 +0,0 @@ -/* global window, global */ -const moduleExports = require('./src'); - -const _global = typeof window === 'undefined' ? global : window; -_global.loaders = _global.loaders || {}; - -module.exports = Object.assign(_global.loaders, moduleExports); diff --git a/modules/images/src/bundle.js b/modules/images/src/bundle.js new file mode 100644 index 0000000000..a81e63800a --- /dev/null +++ b/modules/images/src/bundle.js @@ -0,0 +1,7 @@ +/* global window, global */ +const moduleExports = require('./index'); + +const _global = typeof window === 'undefined' ? global : window; +_global.loaders = _global.loaders || {}; + +module.exports = Object.assign(_global.loaders, moduleExports); diff --git a/modules/kml/bundle.js b/modules/kml/bundle.js deleted file mode 100644 index 4a0e76d2a1..0000000000 --- a/modules/kml/bundle.js +++ /dev/null @@ -1,7 +0,0 @@ -/* global window, global */ -const moduleExports = require('./src'); - -const _global = typeof window === 'undefined' ? global : window; -_global.loaders = _global.loaders || {}; - -module.exports = Object.assign(_global.loaders, moduleExports); diff --git a/modules/kml/src/bundle.js b/modules/kml/src/bundle.js new file mode 100644 index 0000000000..a81e63800a --- /dev/null +++ b/modules/kml/src/bundle.js @@ -0,0 +1,7 @@ +/* global window, global */ +const moduleExports = require('./index'); + +const _global = typeof window === 'undefined' ? global : window; +_global.loaders = _global.loaders || {}; + +module.exports = Object.assign(_global.loaders, moduleExports); diff --git a/modules/las/bundle.js b/modules/las/bundle.js deleted file mode 100644 index 4a0e76d2a1..0000000000 --- a/modules/las/bundle.js +++ /dev/null @@ -1,7 +0,0 @@ -/* global window, global */ -const moduleExports = require('./src'); - -const _global = typeof window === 'undefined' ? global : window; -_global.loaders = _global.loaders || {}; - -module.exports = Object.assign(_global.loaders, moduleExports); diff --git a/modules/las/src/bundle.js b/modules/las/src/bundle.js new file mode 100644 index 0000000000..a81e63800a --- /dev/null +++ b/modules/las/src/bundle.js @@ -0,0 +1,7 @@ +/* global window, global */ +const moduleExports = require('./index'); + +const _global = typeof window === 'undefined' ? global : window; +_global.loaders = _global.loaders || {}; + +module.exports = Object.assign(_global.loaders, moduleExports); diff --git a/modules/obj/bundle.js b/modules/obj/bundle.js deleted file mode 100644 index 4a0e76d2a1..0000000000 --- a/modules/obj/bundle.js +++ /dev/null @@ -1,7 +0,0 @@ -/* global window, global */ -const moduleExports = require('./src'); - -const _global = typeof window === 'undefined' ? global : window; -_global.loaders = _global.loaders || {}; - -module.exports = Object.assign(_global.loaders, moduleExports); diff --git a/modules/obj/src/bundle.js b/modules/obj/src/bundle.js new file mode 100644 index 0000000000..a81e63800a --- /dev/null +++ b/modules/obj/src/bundle.js @@ -0,0 +1,7 @@ +/* global window, global */ +const moduleExports = require('./index'); + +const _global = typeof window === 'undefined' ? global : window; +_global.loaders = _global.loaders || {}; + +module.exports = Object.assign(_global.loaders, moduleExports); diff --git a/modules/pcd/bundle.js b/modules/pcd/bundle.js deleted file mode 100644 index 4a0e76d2a1..0000000000 --- a/modules/pcd/bundle.js +++ /dev/null @@ -1,7 +0,0 @@ -/* global window, global */ -const moduleExports = require('./src'); - -const _global = typeof window === 'undefined' ? global : window; -_global.loaders = _global.loaders || {}; - -module.exports = Object.assign(_global.loaders, moduleExports); diff --git a/modules/pcd/src/bundle.js b/modules/pcd/src/bundle.js new file mode 100644 index 0000000000..a81e63800a --- /dev/null +++ b/modules/pcd/src/bundle.js @@ -0,0 +1,7 @@ +/* global window, global */ +const moduleExports = require('./index'); + +const _global = typeof window === 'undefined' ? global : window; +_global.loaders = _global.loaders || {}; + +module.exports = Object.assign(_global.loaders, moduleExports); diff --git a/modules/ply/bundle.js b/modules/ply/bundle.js deleted file mode 100644 index 4a0e76d2a1..0000000000 --- a/modules/ply/bundle.js +++ /dev/null @@ -1,7 +0,0 @@ -/* global window, global */ -const moduleExports = require('./src'); - -const _global = typeof window === 'undefined' ? global : window; -_global.loaders = _global.loaders || {}; - -module.exports = Object.assign(_global.loaders, moduleExports); diff --git a/modules/ply/src/bundle.js b/modules/ply/src/bundle.js new file mode 100644 index 0000000000..a81e63800a --- /dev/null +++ b/modules/ply/src/bundle.js @@ -0,0 +1,7 @@ +/* global window, global */ +const moduleExports = require('./index'); + +const _global = typeof window === 'undefined' ? global : window; +_global.loaders = _global.loaders || {}; + +module.exports = Object.assign(_global.loaders, moduleExports); diff --git a/modules/zip/bundle.js b/modules/zip/bundle.js deleted file mode 100644 index 4a0e76d2a1..0000000000 --- a/modules/zip/bundle.js +++ /dev/null @@ -1,7 +0,0 @@ -/* global window, global */ -const moduleExports = require('./src'); - -const _global = typeof window === 'undefined' ? global : window; -_global.loaders = _global.loaders || {}; - -module.exports = Object.assign(_global.loaders, moduleExports); diff --git a/modules/zip/src/bundle.js b/modules/zip/src/bundle.js new file mode 100644 index 0000000000..a81e63800a --- /dev/null +++ b/modules/zip/src/bundle.js @@ -0,0 +1,7 @@ +/* global window, global */ +const moduleExports = require('./index'); + +const _global = typeof window === 'undefined' ? global : window; +_global.loaders = _global.loaders || {}; + +module.exports = Object.assign(_global.loaders, moduleExports); diff --git a/scripts/bundle.config.js b/scripts/bundle.config.js index 1ba4b963f7..81373a036c 100644 --- a/scripts/bundle.config.js +++ b/scripts/bundle.config.js @@ -46,7 +46,7 @@ const config = { mode: 'production', entry: { - main: resolve('./bundle') + main: resolve('./src/bundle') }, output: {