diff --git a/docs/guide/migration.md b/docs/guide/migration.md index 5ad49cb984248f..d300c15bda2af4 100644 --- a/docs/guide/migration.md +++ b/docs/guide/migration.md @@ -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: