Explorar el Código

Swap mainfields in build script (#2751)

This reduces the build size of the module by ~20%
Eric Kwoka hace 3 años
padre
commit
0d1731b30e
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      scripts/build.js

+ 1 - 1
scripts/build.js

@@ -59,7 +59,7 @@ function bundleFile(package, file) {
                 outfile: `packages/${package}/dist/${file.replace('.js', '.esm.js')}`,
                 bundle: true,
                 platform: 'neutral',
-                mainFields: ['main', 'module'],
+                mainFields: ['module', 'main'],
             })
 
             build({