Skip to content

Commit de5faca

Browse files
committed
chore(wip)!: build a vue2-jsx package based on the vue-jsx source
As of this commit, only the branding is changed, no actual functionality implemented yet.
1 parent 933bba1 commit de5faca

File tree

10 files changed

+1668
-279
lines changed

10 files changed

+1668
-279
lines changed

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
dist
2+
node_modules
3+
4+
*.local
5+
*.log
6+
7+
.DS_Store

CHANGELOG.md

Lines changed: 0 additions & 245 deletions
This file was deleted.

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
# @vitejs/plugin-vue-jsx [![npm](https://img.shields.io/npm/v/@vitejs/plugin-vue-jsx.svg)](https://npmjs.com/package/@vitejs/plugin-vue-jsx)
1+
# @vitejs/plugin-vue2-jsx [![npm](https://img.shields.io/npm/v/@vitejs/plugin-vue2-jsx.svg)](https://npmjs.com/package/@vitejs/plugin-vue2-jsx)
22

3-
Provides Vue 3 JSX & TSX support with HMR.
3+
Provides Vue 2 JSX & TSX support with HMR.
44

55
```js
66
// vite.config.js
7-
import vueJsx from '@vitejs/plugin-vue-jsx'
7+
import vueJsx from '@vitejs/plugin-vue2-jsx'
88

99
export default {
1010
plugins: [
1111
vueJsx({
12-
// options are passed on to @vue/babel-plugin-jsx
12+
// options are passed on to @vue/babel-preset-jsx
1313
})
1414
]
1515
}
@@ -33,7 +33,7 @@ Default: `undefined`
3333

3434
A [picomatch pattern](https://github.com/micromatch/picomatch), or array of patterns, which specifies the files to be ignored by the plugin.
3535

36-
> See [@vue/babel-plugin-jsx](https://github.com/vuejs/jsx-next) for other options.
36+
> See [@vue/babel-preset-jsx](https://github.com/vuejs/jsx-vue2/tree/dev/packages/babel-preset-jsx#readme) for other options.
3737
3838
## HMR Detection
3939

package.json

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "@vitejs/plugin-vue-jsx",
3-
"version": "2.0.0-beta.0",
2+
"name": "@vitejs/plugin-vue2-jsx",
3+
"version": "1.0.0",
44
"license": "MIT",
55
"author": "Evan You",
66
"files": [
@@ -19,32 +19,37 @@
1919
"scripts": {
2020
"dev": "unbuild --stub",
2121
"build": "unbuild && pnpm run patch-cjs",
22-
"patch-cjs": "tsx ../../scripts/patchCJS.ts",
22+
"patch-cjs": "tsx ./scripts/patchCJS.ts",
2323
"prepublishOnly": "npm run build"
2424
},
2525
"engines": {
2626
"node": ">=14.18.0"
2727
},
2828
"repository": {
2929
"type": "git",
30-
"url": "git+https://github.com/vitejs/vite.git",
31-
"directory": "packages/plugin-vue-jsx"
30+
"url": "git+https://github.com/vitejs/plugin-vue2-jsx.git"
3231
},
3332
"bugs": {
34-
"url": "https://github.com/vitejs/vite/issues"
33+
"url": "https://github.com/vitejs/plugin-vue2-jsx/issues"
3534
},
36-
"homepage": "https://github.com/vitejs/vite/tree/main/packages/plugin-vue-jsx#readme",
35+
"homepage": "https://github.com/vitejs/plugin-vue2-jsx#readme",
3736
"dependencies": {
3837
"@babel/core": "^7.18.6",
3938
"@babel/plugin-syntax-import-meta": "^7.10.4",
4039
"@babel/plugin-transform-typescript": "^7.18.6",
41-
"@vue/babel-plugin-jsx": "^1.1.1"
40+
"@rollup/pluginutils": "^4.2.1",
41+
"@vue/babel-preset-jsx": "^1.3.0"
4242
},
4343
"devDependencies": {
44-
"vite": "workspace:*"
44+
"@types/babel__core": "^7.1.19",
45+
"picocolors": "^1.0.0",
46+
"tsx": "^3.7.1",
47+
"unbuild": "^0.7.4",
48+
"vite": "^2.9.13",
49+
"vue": "^2.7.0"
4550
},
4651
"peerDependencies": {
47-
"vite": "^3.0.0-alpha",
48-
"vue": "^3.0.0"
52+
"vite": "^2.9.13",
53+
"vue": "^2.7.0"
4954
}
5055
}

0 commit comments

Comments
 (0)