import { terser } from 'rollup-plugin-terser'
import { plugins, moduleGlobals, umdGlobals, moduleExternals } from './rollup.config.js'
import { threeMinifier } from "@yushijinhun/three-minifier-rollup";

const minModuleConfig = {
  input: 'src/ngl.ts',
  plugins: [ ...plugins, terser() ],
  output: [{
    file: 'dist/ngl.umd.js',
    format: 'umd',
    name: 'NGL',
    sourcemap: true,
    globals: umdGlobals
  },
  {
    file: 'dist/ngl.esm.js',
    format: 'es',
    name: 'NGL',
    sourcemap: true,
    globals: moduleGlobals
  }
  ],
  external: moduleExternals
}

const minBundleConfig = {
  input: 'src/ngl.ts',
  plugins: [ threeMinifier(), ...plugins, terser()],
  output: [{
    file: 'dist/ngl.bundle.umd.js',
    format: 'umd',
    name: 'NGL',
    sourcemap: true,
    globals: {}
  },
  {
    file: 'dist/ngl.bundle.esm.js',
    format: 'es',
    name: 'NGL',
    sourcemap: true,
    globals: {}
  },
  ],
  external: []
}

export default [ minModuleConfig, minBundleConfig ]

@@ -671,33 +671,32 @@
 r()%5D,%0A  output: 
-%5B
 %7B%0A    file: 'dis
@@ -705,19 +705,8 @@
 ngl.
-bundle.umd.
 js',
@@ -783,135 +783,13 @@
  %7B%7D%0A
+
   %7D,%0A
-  %7B%0A    file: 'dist/ngl.bundle.esm.js',%0A    format: 'es',%0A    name: 'NGL',%0A    sourcemap: true,%0A    globals: %7B%7D%0A  %7D,%0A  %5D,%0A
   ex

Drop ngl.bundle.esm.js again