Webpack: Does the order of plugins matter?

后端 未结 2 1115
广开言路
广开言路 2021-02-02 04:53

I looked it up at the docs here and here, searched StackOverflow and GitHub discussions and still can\'t find this information. Is there any resource or does anyone knows if the

相关标签:
2条回答
  • 2021-02-02 05:25

    webpack is not a task runner. These plugins are tasks, which is not "webpack-style" and not supported. You can report the issue there, but there is nothing to do on webpack side (and I don't care much). -sokra

    ref

    0 讨论(0)
  • 2021-02-02 05:40

    Yes, the order matters: plugins are bound to the compiler and applied in the order specified. You can look into webpack/tapable for a clearer idea on how this works.

    Usually, though, you are not forced to think about ordering when binding compiler and compilation plugins, as plugin authors expose specific events that help you reason when your handlers will be invoked.

    0 讨论(0)
提交回复
热议问题