Webpack: Does the order of plugins matter?

后端 未结 2 1128
广开言路
广开言路 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: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.

提交回复
热议问题