Skip to content

Commit 05b3ce6

Browse files
authored
refactor: migrate from vue/compiler-dom to parse5 (#9678)
1 parent 9c7e43d commit 05b3ce6

File tree

9 files changed

+288
-256
lines changed

9 files changed

+288
-256
lines changed

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ pnpm-lock.yaml
77
pnpm-workspace.yaml
88
playground/tsconfig-json-load-error/has-error/tsconfig.json
99
playground/html/invalid.html
10+
playground/html/valid.html
1011
playground/worker/classic-worker.js

packages/vite/LICENSE.md

Lines changed: 46 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -559,93 +559,6 @@ Repository: rollup/plugins
559559
560560
---------------------------------------
561561

562-
## @vue/compiler-core
563-
License: MIT
564-
By: Evan You
565-
Repository: git+https://github.com/vuejs/core.git
566-
567-
> The MIT License (MIT)
568-
>
569-
> Copyright (c) 2018-present, Yuxi (Evan) You
570-
>
571-
> Permission is hereby granted, free of charge, to any person obtaining a copy
572-
> of this software and associated documentation files (the "Software"), to deal
573-
> in the Software without restriction, including without limitation the rights
574-
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
575-
> copies of the Software, and to permit persons to whom the Software is
576-
> furnished to do so, subject to the following conditions:
577-
>
578-
> The above copyright notice and this permission notice shall be included in
579-
> all copies or substantial portions of the Software.
580-
>
581-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
582-
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
583-
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
584-
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
585-
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
586-
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
587-
> THE SOFTWARE.
588-
589-
---------------------------------------
590-
591-
## @vue/compiler-dom
592-
License: MIT
593-
By: Evan You
594-
Repository: git+https://github.com/vuejs/core.git
595-
596-
> The MIT License (MIT)
597-
>
598-
> Copyright (c) 2018-present, Yuxi (Evan) You
599-
>
600-
> Permission is hereby granted, free of charge, to any person obtaining a copy
601-
> of this software and associated documentation files (the "Software"), to deal
602-
> in the Software without restriction, including without limitation the rights
603-
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
604-
> copies of the Software, and to permit persons to whom the Software is
605-
> furnished to do so, subject to the following conditions:
606-
>
607-
> The above copyright notice and this permission notice shall be included in
608-
> all copies or substantial portions of the Software.
609-
>
610-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
611-
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
612-
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
613-
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
614-
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
615-
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
616-
> THE SOFTWARE.
617-
618-
---------------------------------------
619-
620-
## @vue/shared
621-
License: MIT
622-
By: Evan You
623-
Repository: git+https://github.com/vuejs/core.git
624-
625-
> The MIT License (MIT)
626-
>
627-
> Copyright (c) 2018-present, Yuxi (Evan) You
628-
>
629-
> Permission is hereby granted, free of charge, to any person obtaining a copy
630-
> of this software and associated documentation files (the "Software"), to deal
631-
> in the Software without restriction, including without limitation the rights
632-
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
633-
> copies of the Software, and to permit persons to whom the Software is
634-
> furnished to do so, subject to the following conditions:
635-
>
636-
> The above copyright notice and this permission notice shall be included in
637-
> all copies or substantial portions of the Software.
638-
>
639-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
640-
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
641-
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
642-
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
643-
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
644-
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
645-
> THE SOFTWARE.
646-
647-
---------------------------------------
648-
649562
## acorn
650563
License: MIT
651564
By: Marijn Haverbeke, Ingvar Stepanyan, Adrian Heine
@@ -1278,6 +1191,25 @@ Repository: pillarjs/encodeurl
12781191
12791192
---------------------------------------
12801193

1194+
## entities
1195+
License: BSD-2-Clause
1196+
By: Felix Boehm
1197+
Repository: git://github.com/fb55/entities.git
1198+
1199+
> Copyright (c) Felix Böhm
1200+
> All rights reserved.
1201+
>
1202+
> Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1203+
>
1204+
> Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
1205+
>
1206+
> Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
1207+
>
1208+
> THIS IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS,
1209+
> EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1210+
1211+
---------------------------------------
1212+
12811213
## es-module-lexer
12821214
License: MIT
12831215
By: Guy Bedford
@@ -2405,6 +2337,33 @@ Repository: sindresorhus/open
24052337
24062338
---------------------------------------
24072339

2340+
## parse5
2341+
License: MIT
2342+
By: Ivan Nikulin, https://github.com/inikulin/parse5/graphs/contributors
2343+
Repository: git://github.com/inikulin/parse5.git
2344+
2345+
> Copyright (c) 2013-2019 Ivan Nikulin ([email protected], https://github.com/inikulin)
2346+
>
2347+
> Permission is hereby granted, free of charge, to any person obtaining a copy
2348+
> of this software and associated documentation files (the "Software"), to deal
2349+
> in the Software without restriction, including without limitation the rights
2350+
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
2351+
> copies of the Software, and to permit persons to whom the Software is
2352+
> furnished to do so, subject to the following conditions:
2353+
>
2354+
> The above copyright notice and this permission notice shall be included in
2355+
> all copies or substantial portions of the Software.
2356+
>
2357+
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2358+
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2359+
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2360+
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2361+
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2362+
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2363+
> THE SOFTWARE.
2364+
2365+
---------------------------------------
2366+
24082367
## parseurl
24092368
License: MIT
24102369
By: Douglas Christopher Wilson, Jonathan Ong

packages/vite/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@
7878
"@rollup/plugin-node-resolve": "13.3.0",
7979
"@rollup/plugin-typescript": "^8.3.4",
8080
"@rollup/pluginutils": "^4.2.1",
81-
"@vue/compiler-dom": "^3.2.37",
8281
"acorn": "^8.8.0",
8382
"cac": "^6.7.12",
8483
"chokidar": "^3.5.3",
@@ -103,6 +102,7 @@
103102
"mrmime": "^1.0.1",
104103
"okie": "^1.0.1",
105104
"open": "^8.4.0",
105+
"parse5": "^7.0.0",
106106
"periscopic": "^3.0.4",
107107
"picocolors": "^1.0.0",
108108
"postcss-import": "^14.1.0",

packages/vite/rollup.config.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import nodeResolve from '@rollup/plugin-node-resolve'
55
import typescript from '@rollup/plugin-typescript'
66
import commonjs from '@rollup/plugin-commonjs'
77
import json from '@rollup/plugin-json'
8-
import alias from '@rollup/plugin-alias'
98
import license from 'rollup-plugin-license'
109
import MagicString from 'magic-string'
1110
import colors from 'picocolors'
@@ -79,14 +78,6 @@ function createNodePlugins(
7978
declarationDir: string | false
8079
): Plugin[] {
8180
return [
82-
alias({
83-
// packages with "module" field that doesn't play well with cjs bundles
84-
entries: {
85-
'@vue/compiler-dom': require.resolve(
86-
'@vue/compiler-dom/dist/compiler-dom.cjs.js'
87-
)
88-
}
89-
}),
9081
nodeResolve({ preferBuiltins: true }),
9182
typescript({
9283
tsconfig: path.resolve(__dirname, 'src/node/tsconfig.json'),

0 commit comments

Comments
 (0)