Skip to content

Commit

Permalink
docs: add migration hint for alias resolving (#1348)
Browse files Browse the repository at this point in the history
  • Loading branch information
timozander authored Jan 4, 2021
1 parent a9b7402 commit 60fca98
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions docs/guide/migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,17 @@

- All Vue specific options are removed; Pass options to the Vue plugin instead.

## Alias Behavior Change

[`alias`](/config/#alias) is now being passed to `@rollup/plugin-alias` and no longer require start/ending slashes. The behavior is now a direct replacement, so 1.0-style directory aliases now require an ending slash:

```diff
- alias: { '/@foo/': path.resolve(__dirname, 'some-special-dir') }
+ alias: { '/@foo/': path.resolve(__dirname, 'some-special-dir') + '/' }
```

Alternatively, you can use the `[{ find: RegExp, replacement: string }]` option format for more precise control.

## Vue Support

Vite 2.0 core is now framework agnostic. Vue support is now provided via [`@vitejs/plugin-vue`](https://github.com/vitejs/vite/tree/main/packages/plugin-vue). Simply install it and add it in the Vite config:
Expand Down

0 comments on commit 60fca98

Please sign in to comment.