Closed porsager closed 7 years ago
Looks good. Is there a better way to "detect" debug mode in rollup?
Released with https://github.com/blakeembrey/free-style/releases/tag/v2.3.1 ❤️
Cool.. Thanks a lot for the quick reaction ;)
To set debug with rollup in this case i would probably just use "banner" to add the process
global to the window like:
rollup({
...
}).then(bundle => {
bundle.generate({
banner: '{ window.process = { env: { NODE_ENV: "development" } } };'
})
})
When using free-style with rollup (and probably other bundlers that doesn't expose a process object) it fails with "process is not defined". Check first to see if process is undefined to make sure free-style works out of the box with those bundlers.