Open r3wt opened 4 years ago
I believe you can just add your own .babelrc
in the root of your project folder. And set NODE_ENV=production
in 'build' script. Like below
// package.json
"build": "NODE_ENV=production microbundle-crl --no-compress --format modern,cjs",
// .babelrc.js
const plugins = [
process.env.NODE_ENV === 'production' && 'transform-remove-console',
].filter(Boolean)
module.exports = {
plugins,
}
i would like my development build to maintain the
console.log
statements, however i would like the production build to haveconsole.log
statements stripped. i have did this in several projects usingbabel-plugin-transform-remove-console
, but i can't figure out where to start with this project, calledmicrobundle-crl
.i also can't find the github page for the package, as the readme points to the microbundle library it was forked from