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

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

@arthurhamon

Description

@arthurhamon

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,
        },
      }),

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions