back to listing index

From Require.js to Webpack - Part 2 (the how)

[web search]
Original source (
Tags: javascript webpack nodejs requirejs npm
Clipped on: 2017-07-02

Image (Asset 1/20) alt= I've found that aliases with "/" on them don't translate well to webpack:


"app/user/actions": "/the/directory/some/more/folders/the_file"

Compiler then complains when a module tries to require it, it looks like it does not resolve properly the path
Instead of resolving to :


It resolves to:


Image (Asset 2/20) alt= require example: require(["promise!file-that-need-be-loaded-with-promise-plugin"], function(module){ ... });