Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions playground/vue-jsx-ts-built-in/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
},
"devDependencies": {
"@babel/plugin-syntax-decorators": "^7.27.1",
"@rollup/plugin-swc": "^0.4.0",
"@swc/core": "^1.13.5",
"@vitejs/plugin-vue": "workspace:*",
"@vitejs/plugin-vue-jsx": "workspace:*"
}
Expand Down
21 changes: 21 additions & 0 deletions playground/vue-jsx-ts-built-in/vite.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { defineConfig } from 'vite'
import * as vite from 'vite'
import vueJsxPlugin from '@vitejs/plugin-vue-jsx'
import vuePlugin from '@vitejs/plugin-vue'
import babelPluginSyntaxDecorators from '@babel/plugin-syntax-decorators'
import swc from '@rollup/plugin-swc'

export default defineConfig({
plugins: [
Expand All @@ -17,6 +19,25 @@ export default defineConfig({
],
}),
vuePlugin(),
// rolldown-vite does not support ecma decorators yet, use SWC to lower them
// https://github.com/oxc-project/oxc/issues/9170
'rolldownVersion' in vite &&
vite.withFilter(
{
...swc({
swc: {
jsc: {
parser: { decorators: true, decoratorsBeforeExport: true },
// NOTE: SWC doesn't support '2023-11' version yet
transform: { decoratorVersion: '2022-03' },
},
},
}),
},
{
transform: { id: /\/decorators\//, code: '@' },
},
),
],
build: {
// to make tests faster
Expand Down
189 changes: 182 additions & 7 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading