Skip to content

Commit

Permalink
fix: remove completly reactivityTransform option
Browse files Browse the repository at this point in the history
  • Loading branch information
huang-julien committed Nov 27, 2023
1 parent db69498 commit 2d480e4
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 34 deletions.
14 changes: 0 additions & 14 deletions docs/2.guide/3.going-further/1.experimental-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,6 @@ export defineNuxtConfig({
})
```

## reactivityTransform

Enables Vue's reactivity transform. Note that this feature has been marked as deprecated in Vue 3.3 and is planned to be removed from core in Vue 3.4.

```ts [nuxt.config.ts]
export defineNuxtConfig({
experimental: {
reactivityTransform: true
}
})
```

:read-more{to="/docs/getting-started/configuration#enabling-experimental-vue-features"}

## externalVue

Externalizes `vue`, `@vue/*` and `vue-router` when building.
Expand Down
4 changes: 0 additions & 4 deletions packages/kit/src/template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,6 @@ export async function writeTypes (nuxt: Nuxt) {
.filter(f => typeof f === 'string')
.map(async id => ({ types: (await readPackageJSON(id, { url: nodeModulePaths }).catch(() => null))?.name || id })))

if (nuxt.options.experimental?.reactivityTransform) {
references.push({ types: 'vue/macros-global' })
}

const declarations: string[] = []

await nuxt.callHook('prepare:types', { references, declarations, tsConfig })
Expand Down
10 changes: 0 additions & 10 deletions packages/schema/src/config/experimental.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,6 @@ export default defineUntypedSchema({
$resolve: val => val ?? false
},

/**
* Enable Vue's reactivity transform
* @see [Vue Reactivity Transform Docs](https://vuejs.org/guide/extras/reactivity-transform.html)
*
* Warning: Reactivity transform feature has been marked as deprecated in Vue 3.3 and is planned to be
* removed from core in Vue 3.4.
* @see [Vue RFC#369](https://github.com/vuejs/rfcs/discussions/369#discussioncomment-5059028)
*/
reactivityTransform: false,

// TODO: Remove when nitro has support for mocking traced dependencies
// https://github.com/unjs/nitro/issues/1118
/**
Expand Down
1 change: 0 additions & 1 deletion packages/vite/src/vite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ export const bundle: NuxtBuilder['bundle'] = async (nuxt) => {
virtual(nuxt.vfs)
],
vue: {
reactivityTransform: nuxt.options.experimental.reactivityTransform,
template: {
transformAssetUrls: {
video: ['src', 'poster'],
Expand Down
5 changes: 1 addition & 4 deletions packages/webpack/src/presets/vue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@ export function vue (ctx: WebpackConfigContext) {
ctx.config.module!.rules!.push({
test: /\.vue$/i,
loader: 'vue-loader',
options: {
reactivityTransform: ctx.nuxt.options.experimental.reactivityTransform,
...ctx.userConfig.loaders.vue
}
options: ctx.userConfig.loaders.vue
})

if (ctx.isClient) {
Expand Down
1 change: 0 additions & 1 deletion test/fixtures/basic/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ export default defineNuxtConfig({
restoreState: true,
inlineSSRStyles: id => !!id && !id.includes('assets.vue'),
componentIslands: true,
reactivityTransform: true,
treeshakeClientOnly: true,
asyncContext: process.env.TEST_CONTEXT === 'async',
appManifest: process.env.TEST_MANIFEST !== 'manifest-off',
Expand Down

0 comments on commit 2d480e4

Please sign in to comment.