Webpack includes AMDPlugin by default, so if a module checks for AMD before CommonJS, that module definition will be used.
if (typeof define === \'function\'
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/