diff --git a/packages/vite/CHANGELOG.md b/packages/vite/CHANGELOG.md index 13817465f09763..1bd80b9028b7f9 100644 --- a/packages/vite/CHANGELOG.md +++ b/packages/vite/CHANGELOG.md @@ -1,5 +1,37 @@ # [2.7.0](https://github.com/vitejs/vite/compare/v2.7.0-beta.11...v2.7.0) (2021-12-07) +- 🎉 Revamped SSR dependency handling +- 🧩 API consolidation +- 🛑 server.fs.strict by default + +### BREAKING CHANGES + +- `server.fs.strict` is `true` by default ([#5341](https://github.com/vitejs/vite/pull/5341)) + See [server filesystem restriction docs](https://vitejs.dev/config/#server-fs-strict) for more details. +- Plugin hooks `ssr` param to object in `resolveId`, `load`, and `transform` ([#5253](https://github.com/vitejs/vite/pull/5253)) + Previous to this release, the `ssr` param was passed as a `boolean` in the last parameter of each hook. The new interface for these hooks is now: + ```ts + export interface Plugin extends RollupPlugin { + // ... other hooks + resolveId?(this: PluginContext, source: string, importer: string | undefined, options: { + custom?: CustomPluginOptions; + ssr?: boolean; + }): Promise | ResolveIdResult; + load?(this: PluginContext, id: string, options?: { + ssr?: boolean; + }): Promise | LoadResult; + transform?(this: TransformPluginContext, code: string, id: string, options?: { + ssr?: boolean; + }): Promise | TransformResult; + } + ``` + In your plugins, you can check if the last param is a boolean or an object to be backward compatible with 2.6 and give some time to users to migrate to Vite 2.7. +- `server.pluginContainer` options object for `resolveId`, `load`, and `transform` ([#5294](https://github.com/vitejs/vite/pull/5294)) +- Normalize scripts and commands naming ([#5207](https://github.com/vitejs/vite/pull/5207)) + Adds a new `vite dev` command alias for `vite serve`, preparing for the new release of create-vite where package scripts are renamed to `dev`, `build`, and `preview`. +- Align experimental `preview` api ([#5407](https://github.com/vitejs/vite/pull/5407)) + This API was first introduced in 2.6 and it is still in flux. +- resolve `rollupOptions.input` paths ([#5601](https://github.com/vitejs/vite/pull/5601)) ### Features @@ -160,35 +192,6 @@ # [2.7.0-beta.0](https://github.com/vitejs/vite/compare/v2.6.13...v2.7.0-beta.0) (2021-10-28) - -### BREAKING CHANGES - -- `server.fs.strict` is `true` by default ([#5341](https://github.com/vitejs/vite/pull/5341)) - See [server filesystem restriction docs](https://vitejs.dev/config/#server-fs-strict) for more details. -- Plugin hooks `ssr` param to object in `resolveId`, `load`, and `transform` ([#5253](https://github.com/vitejs/vite/pull/5253)) - Previous to this release, the `ssr` param was passed as a `boolean` in the last parameter of each hook. The new interface for these hooks is now: - ```ts - export interface Plugin extends RollupPlugin { - // ... other hooks - resolveId?(this: PluginContext, source: string, importer: string | undefined, options: { - custom?: CustomPluginOptions; - ssr?: boolean; - }): Promise | ResolveIdResult; - load?(this: PluginContext, id: string, options?: { - ssr?: boolean; - }): Promise | LoadResult; - transform?(this: TransformPluginContext, code: string, id: string, options?: { - ssr?: boolean; - }): Promise | TransformResult; - } - ``` - In your plugins, you can check if the last param is a boolean or an object to be backward compatible with 2.6 and give some time to users to migrate to Vite 2.7. -- `server.pluginContainer` options object for `resolveId`, `load`, and `transform` ([#5294](https://github.com/vitejs/vite/pull/5294)) -- Normalize scripts and commands naming ([#5207](https://github.com/vitejs/vite/pull/5207)) - Adds a new `vite dev` command alias for `vite serve`, preparing for the new release of create-vite where package scripts are renamed to `dev`, `build`, and `preview`. -- Align experimental `preview` api ([#5407](https://github.com/vitejs/vite/pull/5407)) - This API was first introduced in 2.6 and it is still in flux. - ### Bug Fixes * add `import` support to `ssrModuleLoader` ([#5197](https://github.com/vitejs/vite/issues/5197)) ([baba1f9](https://github.com/vitejs/vite/commit/baba1f9e8fb22254b3858bcc1ffe89b334736068))