Skip to content
This repository has been archived by the owner on Sep 23, 2023. It is now read-only.

Modify webpack config for cmd : direflow-scripts build:lib #269

Open
arthurhamon opened this issue May 18, 2022 · 0 comments
Open

Modify webpack config for cmd : direflow-scripts build:lib #269

arthurhamon opened this issue May 18, 2022 · 0 comments
Labels
Enhancement New feature or request

Comments

@arthurhamon
Copy link

Hello,

Is their a way to change the webpack config use with this cmd : direflow-scripts build:lib ?

Why I want to do that ?
I want to change the TerserPlugin config in order to authorise console.info and console.errror.

So I want to change the config from :

new TerserPlugin({
        terserOptions: {
          ecma: 5,
          warnings: false,
          parse: {},
          compress: {
            toplevel: true,
            unused: true,
            dead_code: true,
            drop_console: true,
          },
          mangle: true,
          module: true,
          output: null,
          toplevel: false,
          nameCache: null,
          ie8: false,
          keep_classnames: undefined,
          keep_fnames: false,
          safari10: false,
        },
      }),

to :

new TerserPlugin({
        terserOptions: {
          ecma: 5,
          warnings: false,
          parse: {},
          compress: {
            toplevel: true,
            unused: true,
            dead_code: true,
            drop_console: false,
            pure_funcs: ['console.log', 'console.debug', 'console.warn', 'console.time', 'console.timeEnd', 'console.trace', 'console.fatal'],
          },
          mangle: true,
          module: true,
          output: null,
          toplevel: false,
          nameCache: null,
          ie8: false,
          keep_classnames: undefined,
          keep_fnames: false,
          safari10: false,
        },
      }),
@arthurhamon arthurhamon added the Enhancement New feature or request label May 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant