poi icon indicating copy to clipboard operation
poi copied to clipboard

[Question] How to remove console.log instructions on build ?

Open KaKi87 opened this issue 4 years ago • 4 comments

KaKi87 avatar Aug 31 '20 13:08 KaKi87

Using a babel plugin https://babeljs.io/docs/en/babel-plugin-transform-remove-console

egoist avatar Aug 31 '20 14:08 egoist

How do I make the link between this plugin and poi ?

KaKi87 avatar Aug 31 '20 14:08 KaKi87

Add it to babel.config.js:

module.exports = {
  presets: ["poi/babel"],

  env: {
    production: {
      plugins: ["transform-remove-console"]
    }
  }
}

egoist avatar Aug 31 '20 14:08 egoist

Isn't it possible to use the existing poi.config.js instead of multiplicating config files ? Thanks

KaKi87 avatar Aug 31 '20 14:08 KaKi87