You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 20, 2022. It is now read-only.
Currently, all imports in the code need to be relative to the current path, making it harder to refactor the code base as it's a pain to have to change all import paths, figuring out how many ../.. are needed.
Adding the src/ directory to webpack's resolve.root config allows developers to go from something like this:
Adding the `src/` directory to resolve.root allows developers to import
modules without having to give the relative path to the current file
imoprting the module. This makes it easier to refactor the code as it's
easier to reason about module paths relative to the project's root
folder.
This is also backwards compatible, and relative imports are still
possible.
Closesmozilla#66
Currently, all imports in the code need to be relative to the current path, making it harder to refactor the code base as it's a pain to have to change all import paths, figuring out how many
../..
are needed.Adding the
src/
directory to webpack'sresolve.root
config allows developers to go from something like this:to something like this:
This change is also backwards compatible, so relative imports still work.
The text was updated successfully, but these errors were encountered: