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 was archived by the owner on Aug 4, 2021. It is now read-only.
This probably doesn't look too bad on its own. But imagine this is not the only instance in your code base and after a refactor/restructuring this might fall over. With this plugin in place, you can alias `../../../something` with `something` for readability. In case of a refactor only the alias would need to be changed instead of navigating through the code base and changing all imports.
15
+
16
+
```javascript
17
+
importsomethingfrom'something';
18
+
19
+
something();
20
+
```
21
+
6
22
When we write tests, we may want an easier way to access the local library we are testing or mocking libraries. We may also define aliases to counteract "require hell" and get rid of all those `../../../` imports we may have in the process.
7
23
8
-
For Webpack users: This is a plugin to have a`resolve.alias` functionality in Rollup.
24
+
For Webpack users: This is a plugin to mimic the`resolve.alias` functionality in Rollup.
0 commit comments