code: function createCoreConfig(moduleFormat, productive, copyAssets) {
    return {
      input: 'src/main/js-surface/index.js',
  
      output: {
        file: productive
          ? `dist/js-surface.${moduleFormat}.production.js`
          : `dist/js-surface.${moduleFormat}.development.js`,
  
        format: moduleFormat,
        name: 'jsSurface',
        exports: 'named',
        sourcemap: productive ? false : 'inline',
  
        globals: {
        }
      },
  
      plugins: [
        resolve({
          jsnext: true,
          main: true,
          module: true,
          browser: true,
        }),
        commonjs({
        }),
        eslint({
        }),
        replace({
          exclude: 'node_modules/**',
  
          values: {
            'process.env.NODE_ENV': productive ? "'production'" : "'development'",
            "import 'preact/devtools'": productive ? '' : "import 'preact/devtools'"
          }
        }),
        babel({
          //exclude: 'node_modules/**',
          //externalHelpers: true,
          presets: [['@babel/preset-env', { modules: false }]],
        }),
        productive && (moduleFormat === 'esm' ? uglifyES() : uglifyJS()),
        productive && gzip(),
        copyAssets && copy({ 'assets': 'dist' })
      ],
    }
  }
docs: --- locals -------------------------------------------------------