Skip to content

Commit

Permalink
Swap mainfields in build script (#2751)
Browse files Browse the repository at this point in the history
This reduces the build size of the module by ~20%
  • Loading branch information
ekwoka committed Mar 21, 2022
1 parent c214602 commit 0d1731b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/build.js
Expand Up @@ -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({
Expand Down

0 comments on commit 0d1731b

Please sign in to comment.