fix: ensure browser field in package.json are used by rollup

This commit is contained in:
Blaine Bublitz 2021-01-17 15:20:07 -07:00
parent f26f7b70f5
commit a7933dc496
2 changed files with 12 additions and 4 deletions

View File

@ -25,9 +25,13 @@ export default {
readline: empty,
worker_threads: empty,
}),
nodeResolve(),
nodeResolve({
browser: true
}),
commonJS(),
replace({ "process.browser": !!process.env.BROWSER }),
replace({
"process.browser": !!process.env.BROWSER
}),
visualizer(),
]
};

View File

@ -24,9 +24,13 @@ export default {
readline: empty,
worker_threads: empty,
}),
nodeResolve(),
nodeResolve({
browser: true
}),
commonJS(),
replace({ "process.browser": !!process.env.BROWSER }),
replace({
"process.browser": !!process.env.BROWSER
}),
terser()
]
};