Skip to content

Commit

Permalink
docs: Updated SWC documentation to include a warning about configurin…
Browse files Browse the repository at this point in the history
…g paths (#193)
  • Loading branch information
patricklafrance authored Mar 26, 2024
1 parent 87ddc4c commit ce341ee
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/swc/configure-build.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@ export const swcConfig = defineBuildConfig(targets, {

### `paths`

!!!warning
You shouldn't need to define custom paths for your project. If you're defining custom paths to support aliases, consider using the [imports](https://medium.com/outbrain-engineering/the-hidden-power-of-package-json-a93143ec0b7c) field of your project's `package.json` file instead.
!!!

- **Type**: `Record<string, string[]>`

A series of entries which re-map imports to lookup locations relative to the [baseUrl](#baseurl) if set.
Expand Down
4 changes: 4 additions & 0 deletions docs/swc/configure-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,10 @@ export const swcConfig = defineDevConfig(targets, {

### `paths`

!!!warning
You shouldn't need to define custom paths for your project. If you're defining custom paths to support aliases, consider using the [imports](https://medium.com/outbrain-engineering/the-hidden-power-of-package-json-a93143ec0b7c) field of your project's `package.json` file instead.
!!!

- **Type**: `Record<string, string[]>`

A series of entries which re-map imports to lookup locations relative to the [baseUrl](#baseurl) if set.
Expand Down
4 changes: 4 additions & 0 deletions docs/swc/configure-jest.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ export const swcConfig = defineJestConfig({

### `paths`

!!!warning
You shouldn't need to define custom paths for your project. If you're defining custom paths to support aliases, consider using the [imports](https://medium.com/outbrain-engineering/the-hidden-power-of-package-json-a93143ec0b7c) field of your project's `package.json` file instead.
!!!

- **Type**: `Record<string, string[]>`

A series of entries which re-map imports to lookup locations relative to the [baseUrl](#baseurl) if set.
Expand Down

0 comments on commit ce341ee

Please sign in to comment.