|
@@ -17,6 +17,20 @@ function createOutput( file ) {
|
|
|
treeshake: false,
|
|
|
external: p => p !== inputPath,
|
|
|
|
|
|
+ plugins: [{
|
|
|
+
|
|
|
+ generateBundle: function(options, bundle) {
|
|
|
+
|
|
|
+ for ( var key in bundle ) {
|
|
|
+
|
|
|
+ bundle[ key ].code = bundle[ key ].code.replace( /three_module_js/g, 'THREE' );
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }],
|
|
|
+
|
|
|
output: {
|
|
|
|
|
|
format: 'umd',
|
|
@@ -29,8 +43,9 @@ function createOutput( file ) {
|
|
|
|
|
|
banner:
|
|
|
'/**\n' +
|
|
|
- ` * Generated from '${ path.relative( '.', inputPath.replace( /\\/, '/' ) ) }'\n` +
|
|
|
- ' */\n'
|
|
|
+ ` * Generated from '${ path.relative( '.', inputPath ).replace( /\\/g, '/' ) }'\n` +
|
|
|
+ ' */\n',
|
|
|
+ esModule: false
|
|
|
|
|
|
}
|
|
|
|