Is there a way to disable AMDPlugin?

前端 未结 3 786
余生分开走
余生分开走 2021-01-01 16:04

Webpack includes AMDPlugin by default, so if a module checks for AMD before CommonJS, that module definition will be used.

if (typeof define === \'function\'         


        
3条回答
  •  感情败类
    2021-01-01 16:52

    You can also add to the following to your rules to disable AMD(webpack 2+):

    module: {
        rules: [
            { parser: { amd: false } }
        ]
    }
    

    From: https://webpack.js.org/configuration/module/

提交回复
热议问题