Skip to content
This repository has been archived by the owner on Feb 17, 2023. It is now read-only.

Commit

Permalink
feat: support vite@2.x (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
underfin authored Jan 5, 2021
1 parent f84bbfc commit 2a9ac82
Show file tree
Hide file tree
Showing 21 changed files with 871 additions and 1,382 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ dist
*.local
yarn-error.log
.idea/
.history/
15 changes: 9 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Vite plugin for Vue2",
"main": "dist/index.js",
"scripts": {
"dev": "tsc -w -p . --skipLibCheck",
"dev": "tsc -w -p . --incremental --skipLibCheck",
"test": "jest --clearCache && jest --runInBand --forceExit",
"build": "rm -rf dist && tsc -p . --skipLibCheck",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
Expand Down Expand Up @@ -41,26 +41,29 @@
},
"dependencies": {
"@babel/core": "^7.11.6",
"@rollup/pluginutils": "^4.1.0",
"@vue/compiler-sfc": "^3.0.0-rc.5",
"@vue/component-compiler-utils": "^3.2.0",
"babel-helper-vue-jsx-merge-props": "^2.0.3",
"babel-plugin-syntax-jsx": "^6.18.0",
"babel-plugin-transform-vue-jsx": "^3.7.0",
"babel-preset-env": "^1.7.0",
"chalk": "^4.1.0",
"debug": "^4.1.1",
"esbuild": "^0.5.19",
"debug": "^4.3.1",
"fs-extra": "^9.0.1",
"hash-sum": "^2.0.0",
"prettier": "^2.0.5",
"rollup-plugin-vue": "5.1.9",
"querystring": "^0.2.0",
"rollup": "^2.35.1",
"vite": "2.0.0-beta.4",
"vue": "^2.6.11",
"vue-template-compiler": "^2.6.11"
},
"peerDependencies": {
"vite": ">=1.0.0-rc.13"
"vite": "2.0.0-beta.4"
},
"devDependencies": {
"@types/debug": "^4.1.5",
"@types/fs-extra": "^9.0.1",
"@types/hash-sum": "^1.0.0",
"@types/jest": "^26.0.4",
Expand All @@ -72,7 +75,7 @@
"lint-staged": "^10.2.11",
"puppeteer": "^3.0.0",
"ts-jest": "^26.1.1",
"typescript": "^3.9.6",
"typescript": "^4.1.2",
"yorkie": "^2.0.0"
}
}
2 changes: 1 addition & 1 deletion playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"author": "",
"license": "ISC",
"devDependencies": {
"vite": "^1.0.0-rc.4"
"vite": "2.0.0-beta.4"
}
}
5 changes: 3 additions & 2 deletions playground/vite.config.js → playground/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { defineConfig } from 'vite'
const { createVuePlugin } = require('../dist')

const config = {
const config = defineConfig({
plugins: [createVuePlugin({ jsx: true })],
}
})

export default config
202 changes: 51 additions & 151 deletions playground/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,154 +2,54 @@
# yarn lockfile v1


async@^2.6.2:
version "2.6.3"
resolved "https://registry.npmjs.org/async/-/async-2.6.3.tgz#d72625e2344a3656e3a3ad4fa749fa83299d82ff"
integrity sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==
dependencies:
lodash "^4.17.14"

basic-auth@^1.0.3:
version "1.1.0"
resolved "https://registry.npmjs.org/basic-auth/-/basic-auth-1.1.0.tgz#45221ee429f7ee1e5035be3f51533f1cdfd29884"
integrity sha1-RSIe5Cn37h5QNb4/UVM/HN/SmIQ=

colors@^1.4.0:
version "1.4.0"
resolved "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78"
integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==

corser@^2.0.1:
version "2.0.1"
resolved "https://registry.npmjs.org/corser/-/corser-2.0.1.tgz#8eda252ecaab5840dcd975ceb90d9370c819ff87"
integrity sha1-jtolLsqrWEDc2XXOuQ2TcMgZ/4c=

debug@^3.1.1:
version "3.2.6"
resolved "https://registry.npm.taobao.org/debug/download/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b"
integrity sha1-6D0X3hbYp++3cX7b5fsQE17uYps=
dependencies:
ms "^2.1.1"

ecstatic@^3.3.2:
version "3.3.2"
resolved "https://registry.npmjs.org/ecstatic/-/ecstatic-3.3.2.tgz#6d1dd49814d00594682c652adb66076a69d46c48"
integrity sha512-fLf9l1hnwrHI2xn9mEDT7KIi22UDqA2jaCwyCbSUJh9a1V+LEUSL/JO/6TIz/QyuBURWUHrFL5Kg2TtO1bkkog==
dependencies:
he "^1.1.1"
mime "^1.6.0"
minimist "^1.1.0"
url-join "^2.0.5"

eventemitter3@^4.0.0:
version "4.0.4"
resolved "https://registry.npm.taobao.org/eventemitter3/download/eventemitter3-4.0.4.tgz#b5463ace635a083d018bdc7c917b4c5f10a85384"
integrity sha1-tUY6zmNaCD0Bi9x8kXtMXxCoU4Q=

follow-redirects@^1.0.0:
version "1.12.1"
resolved "https://registry.npm.taobao.org/follow-redirects/download/follow-redirects-1.12.1.tgz?cache=0&sync_timestamp=1592518629143&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffollow-redirects%2Fdownload%2Ffollow-redirects-1.12.1.tgz#de54a6205311b93d60398ebc01cf7015682312b6"
integrity sha1-3lSmIFMRuT1gOY68Ac9wFWgjErY=

he@^1.1.1:
version "1.2.0"
resolved "https://registry.npmjs.org/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f"
integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==

http-proxy@^1.18.0:
version "1.18.1"
resolved "https://registry.npm.taobao.org/http-proxy/download/http-proxy-1.18.1.tgz#401541f0534884bbf95260334e72f88ee3976549"
integrity sha1-QBVB8FNIhLv5UmAzTnL4juOXZUk=
dependencies:
eventemitter3 "^4.0.0"
follow-redirects "^1.0.0"
requires-port "^1.0.0"

http-server@^0.12.3:
version "0.12.3"
resolved "https://registry.npmjs.org/http-server/-/http-server-0.12.3.tgz#ba0471d0ecc425886616cb35c4faf279140a0d37"
integrity sha512-be0dKG6pni92bRjq0kvExtj/NrrAd28/8fCXkaI/4piTwQMSDSLMhWyW0NI1V+DBI3aa1HMlQu46/HjVLfmugA==
dependencies:
basic-auth "^1.0.3"
colors "^1.4.0"
corser "^2.0.1"
ecstatic "^3.3.2"
http-proxy "^1.18.0"
minimist "^1.2.5"
opener "^1.5.1"
portfinder "^1.0.25"
secure-compare "3.0.1"
union "~0.5.0"

lodash@^4.17.14:
version "4.17.15"
resolved "https://registry.npm.taobao.org/lodash/download/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548"
integrity sha1-tEf2ZwoEVbv+7dETku/zMOoJdUg=

mime@^1.6.0:
version "1.6.0"
resolved "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1"
integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==

minimist@^1.1.0, minimist@^1.2.5:
version "1.2.5"
resolved "https://registry.npm.taobao.org/minimist/download/minimist-1.2.5.tgz?cache=0&sync_timestamp=1584060927134&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fminimist%2Fdownload%2Fminimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602"
integrity sha1-Z9ZgFLZqaoqqDAg8X9WN9OTpdgI=

mkdirp@^0.5.1:
version "0.5.5"
resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def"
integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==
dependencies:
minimist "^1.2.5"

ms@^2.1.1:
version "2.1.2"
resolved "https://registry.npm.taobao.org/ms/download/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
integrity sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=

opener@^1.5.1:
version "1.5.1"
resolved "https://registry.npmjs.org/opener/-/opener-1.5.1.tgz#6d2f0e77f1a0af0032aca716c2c1fbb8e7e8abed"
integrity sha512-goYSy5c2UXE4Ra1xixabeVh1guIX/ZV/YokJksb6q2lubWu6UbvPQ20p542/sFIll1nl8JnCyK9oBaOcCWXwvA==

portfinder@^1.0.25:
version "1.0.26"
resolved "https://registry.npmjs.org/portfinder/-/portfinder-1.0.26.tgz#475658d56ca30bed72ac7f1378ed350bd1b64e70"
integrity sha512-Xi7mKxJHHMI3rIUrnm/jjUgwhbYMkp/XKEcZX3aG4BrumLpq3nmoQMX+ClYnDZnZ/New7IatC1no5RX0zo1vXQ==
dependencies:
async "^2.6.2"
debug "^3.1.1"
mkdirp "^0.5.1"

qs@^6.4.0:
version "6.9.4"
resolved "https://registry.npmjs.org/qs/-/qs-6.9.4.tgz#9090b290d1f91728d3c22e54843ca44aea5ab687"
integrity sha512-A1kFqHekCTM7cz0udomYUoYNWjBebHm/5wzU/XqrBRBNWectVH0QIiN+NEcZ0Dte5hvzHwbr8+XQmguPhJ6WdQ==

requires-port@^1.0.0:
version "1.0.0"
resolved "https://registry.npm.taobao.org/requires-port/download/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff"
integrity sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=

secure-compare@3.0.1:
version "3.0.1"
resolved "https://registry.npmjs.org/secure-compare/-/secure-compare-3.0.1.tgz#f1a0329b308b221fae37b9974f3d578d0ca999e3"
integrity sha1-8aAymzCLIh+uN7mXTz1XjQypmeM=

union@~0.5.0:
version "0.5.0"
resolved "https://registry.npmjs.org/union/-/union-0.5.0.tgz#b2c11be84f60538537b846edb9ba266ba0090075"
integrity sha512-N6uOhuW6zO95P3Mel2I2zMsbsanvvtgn6jVqJv4vbVcz/JN0OkL9suomjQGmWtxJQXOCqUJvquc1sMeNz/IwlA==
dependencies:
qs "^6.4.0"

url-join@^2.0.5:
version "2.0.5"
resolved "https://registry.npmjs.org/url-join/-/url-join-2.0.5.tgz#5af22f18c052a000a48d7b82c5e9c2e2feeda728"
integrity sha1-WvIvGMBSoACkjXuCxenC4v7tpyg=

vue@^2.6.11:
version "2.6.11"
resolved "https://registry.npm.taobao.org/vue/download/vue-2.6.11.tgz#76594d877d4b12234406e84e35275c6d514125c5"
integrity sha1-dllNh31LEiNEBuhONSdcbVFBJcU=
colorette@^1.2.1:
version "1.2.1"
resolved "https://registry.npm.taobao.org/colorette/download/colorette-1.2.1.tgz?cache=0&sync_timestamp=1593955804228&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcolorette%2Fdownload%2Fcolorette-1.2.1.tgz#4d0b921325c14faf92633086a536db6e89564b1b"
integrity sha1-TQuSEyXBT6+SYzCGpTbbbolWSxs=

esbuild@^0.8.26:
version "0.8.29"
resolved "https://registry.npm.taobao.org/esbuild/download/esbuild-0.8.29.tgz?cache=0&sync_timestamp=1609590760009&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fesbuild%2Fdownload%2Fesbuild-0.8.29.tgz#cc20fb752e0905a3546d68ae1be58f9b97044c39"
integrity sha1-zCD7dS4JBaNUbWiuG+WPm5cETDk=

fsevents@~2.1.2:
version "2.1.3"
resolved "https://registry.npm.taobao.org/fsevents/download/fsevents-2.1.3.tgz?cache=0&sync_timestamp=1608033993741&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffsevents%2Fdownload%2Ffsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e"
integrity sha1-+3OHA66NL5/pAMM4Nt3r7ouX8j4=

nanoid@^3.1.20:
version "3.1.20"
resolved "https://registry.npm.taobao.org/nanoid/download/nanoid-3.1.20.tgz?cache=0&sync_timestamp=1606833990942&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnanoid%2Fdownload%2Fnanoid-3.1.20.tgz#badc263c6b1dcf14b71efaa85f6ab4c1d6cfc788"
integrity sha1-utwmPGsdzxS3HvqoX2q0wdbPx4g=

postcss@^8.2.1:
version "8.2.2"
resolved "https://registry.npm.taobao.org/postcss/download/postcss-8.2.2.tgz?cache=0&sync_timestamp=1609273988566&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss%2Fdownload%2Fpostcss-8.2.2.tgz#60613b62297005084fd21024a68637798864fe26"
integrity sha1-YGE7YilwBQhP0hAkpoY3eYhk/iY=
dependencies:
colorette "^1.2.1"
nanoid "^3.1.20"
source-map "^0.6.1"

rollup@^2.35.1:
version "2.35.1"
resolved "https://registry.npm.taobao.org/rollup/download/rollup-2.35.1.tgz?cache=0&sync_timestamp=1607955456160&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Frollup%2Fdownload%2Frollup-2.35.1.tgz#e6bc8d10893556a638066f89e8c97f422d03968c"
integrity sha1-5ryNEIk1VqY4Bm+J6Ml/Qi0Dlow=
optionalDependencies:
fsevents "~2.1.2"

source-map@^0.6.1:
version "0.6.1"
resolved "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
integrity sha1-dHIq8y6WFOnCh6jQu95IteLxomM=

vite@2.0.0-beta.4:
version "2.0.0-beta.4"
resolved "https://registry.npm.taobao.org/vite/download/vite-2.0.0-beta.4.tgz?cache=0&sync_timestamp=1609742842115&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvite%2Fdownload%2Fvite-2.0.0-beta.4.tgz#6ea8e08ae5e6b510548d02ec770d34046622aef7"
integrity sha1-bqjgiuXmtRBUjQLsdw00BGYirvc=
dependencies:
esbuild "^0.8.26"
postcss "^8.2.1"
rollup "^2.35.1"
optionalDependencies:
fsevents "~2.1.2"
Loading

0 comments on commit 2a9ac82

Please sign in to comment.