Procházet zdrojové kódy

Swap mainfields in build script (#2751)

This reduces the build size of the module by ~20%
Eric Kwoka před 3 roky
rodič
revize
0d1731b30e
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  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({