Is there a way to disable AMDPlugin?

前端 未结 3 796
余生分开走
余生分开走 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:57

    Also consider script-loader, as mentioned at the end of the Shimming documentation:

    The script-loader evaluates code in the global context, similar to inclusion via a script tag. In this mode, every normal library should work. require, module, etc. are undefined.

提交回复
热议问题