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 Jun 20, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: docs/development/configuration.md
+33-8Lines changed: 33 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -631,14 +631,6 @@ FuseBox.init({
631
631
})
632
632
```
633
633
634
-
Alternatively you can use the chainable API
635
-
636
-
```js
637
-
fuse.bundle("app")
638
-
.alias("foo", "~/foo/f")
639
-
.alias("bar", "~/bar/b")
640
-
```
641
-
642
634
643
635
In your code, you would use it in a way similar to this:
644
636
```js
@@ -648,6 +640,39 @@ import faraway from "faraway";
648
640
console.log(utils, faraway);
649
641
```
650
642
643
+
644
+
`baseUrl` option will automatically list your home directory and create aliases, unless `automaticAlias` is set
645
+
```json
646
+
{
647
+
"compilerOptions": {
648
+
"baseUrl": "."
649
+
}
650
+
}
651
+
```
652
+
653
+
## Automatic alias
654
+
655
+
The option `automaticAlias` is enabled by default, and works only if `tsconfig.json` is found and you are dealing with typescript
656
+
657
+
```json
658
+
{
659
+
"compilerOptions": {
660
+
"baseUrl": "."
661
+
}
662
+
}
663
+
```
664
+
665
+
FuseBox will automatically list all your homeDir directories and map aliases for you. Note, that baseURL should be equal `.` and located right in your home directory (for example `src/`)
666
+
667
+
668
+
```
669
+
→ Applying automatic alias based on baseUrl in tsconfig.json
670
+
→
671
+
components => "~/components"
672
+
foo => "~/foo"
673
+
index => "~/index"
674
+
ui => "~/ui"
675
+
```
651
676
## Extension Overrides
652
677
653
678
You can optionally override how file extensions are resolved. This is useful if you want to create platform specific bundles:
0 commit comments