Merge pull request #82 from phated/phated/rollup-browser-field

fix: ensure browser field in package.json are used by rollup
This commit is contained in:
Jordi Baylina 2021-01-21 19:27:40 +01:00 committed by GitHub
commit e636769dc6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 4 deletions

@ -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(),
]
};

@ -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()
]
};