Webpack with requirejs/AMD

I’m working on a new module for an existing project that still uses requireJS for module loading. I’m trying to use new technologies for my new module like webpack (which allows me to use es6 loaders using es6 imports). It seems like webpack can’t reconcile with requireJS syntax. It will say things like: “Module not found: Error: Can’t resolve in “.

Problem: Webpack won’t bundle files with requireJS/AMD syntax in them.
Question: Is there any way to make webpack play nice with requireJS?

My final output must be in AMD format in order for the project to properly load it. Thanks.


Source: stackoverflow-javascript