When do I use 'use' and 'loader' in Webpack 2 module.rules?

后端 未结 2 1983
后悔当初
后悔当初 2021-02-06 21:59

I am upgrading my current project to Webpack2, which it was using Webpack1 prior. I have looked into a couple tutorials about upgrading and in

2条回答
  •  不知归路
    2021-02-06 22:12

    module.rules is meant for loaders. Specifying a rule as loader is just a shortcut for

    use: [{loader}]
    

    For plugins, use the plugins property in your configuration.

提交回复
热议问题