diff --git a/packages/vite/src/node/plugins/importAnalysisBuild.ts b/packages/vite/src/node/plugins/importAnalysisBuild.ts index a4b091dc76da3a..5b7d738c2da264 100644 --- a/packages/vite/src/node/plugins/importAnalysisBuild.ts +++ b/packages/vite/src/node/plugins/importAnalysisBuild.ts @@ -145,11 +145,15 @@ export function buildImportAnalysisPlugin(config: ResolvedConfig): Plugin { d: dynamicIndex } = imports[index] - if (dynamicIndex > -1 && insertPreload) { + const isDynamic = dynamicIndex > -1 + + if (isDynamic && insertPreload) { needPreloadHelper = true - const original = source.slice(expStart, expEnd) - const replacement = `${preloadMethod}(() => ${original},${isModernFlag}?"${preloadMarker}":void 0)` - str().overwrite(expStart, expEnd, replacement, { contentOnly: true }) + str().prependLeft(expStart, `${preloadMethod}(() => `) + str().appendRight( + expEnd, + `,${isModernFlag}?"${preloadMarker}":void 0)` + ) } // Differentiate CSS imports that use the default export from those that @@ -159,14 +163,16 @@ export function buildImportAnalysisPlugin(config: ResolvedConfig): Plugin { if ( specifier && isCSSRequest(specifier) && - source.slice(expStart, start).includes('from') && + // always inject ?used query when it is a dynamic import + // because there is no way to check whether the default export is used + (source.slice(expStart, start).includes('from') || isDynamic) && // already has ?used query (by import.meta.glob) !specifier.match(/\?used(&|$)/) && // edge case for package names ending with .css (e.g normalize.css) !(bareImportRE.test(specifier) && !specifier.includes('/')) ) { const url = specifier.replace(/\?|$/, (m) => `?used${m ? '&' : ''}`) - str().overwrite(start, end, dynamicIndex > -1 ? `'${url}'` : url, { + str().overwrite(start, end, isDynamic ? `'${url}'` : url, { contentOnly: true }) } diff --git a/playground/css-codesplit/__tests__/css-codesplit.spec.ts b/playground/css-codesplit/__tests__/css-codesplit.spec.ts index 95fe97a1b953ba..789adba23ae021 100644 --- a/playground/css-codesplit/__tests__/css-codesplit.spec.ts +++ b/playground/css-codesplit/__tests__/css-codesplit.spec.ts @@ -1,8 +1,23 @@ import { findAssetFile, getColor, isBuild, readManifest } from '../../testUtils' -test('should load both stylesheets', async () => { +test('should load all stylesheets', async () => { expect(await getColor('h1')).toBe('red') expect(await getColor('h2')).toBe('blue') + expect(await getColor('.dynamic')).toBe('green') +}) + +test('should load dynamic import with inline', async () => { + const css = await page.textContent('.dynamic-inline') + expect(css).toMatch('.inline') + + expect(await getColor('.inline')).not.toBe('yellow') +}) + +test('should load dynamic import with module', async () => { + const css = await page.textContent('.dynamic-module') + expect(css).toMatch('_mod_') + + expect(await getColor('.mod')).toBe('yellow') }) if (isBuild) { @@ -10,6 +25,7 @@ if (isBuild) { expect(findAssetFile(/style.*\.js$/)).toBe('') expect(findAssetFile('main.*.js$')).toMatch(`/* empty css`) expect(findAssetFile('other.*.js$')).toMatch(`/* empty css`) + expect(findAssetFile(/async.*\.js$/)).toBe('') }) test('should generate correct manifest', async () => { diff --git a/playground/css-codesplit/async.css b/playground/css-codesplit/async.css new file mode 100644 index 00000000000000..4902b2e7bee811 --- /dev/null +++ b/playground/css-codesplit/async.css @@ -0,0 +1,3 @@ +.dynamic { + color: green; +} diff --git a/playground/css-codesplit/index.html b/playground/css-codesplit/index.html index 6b7b3bb2b4dc2d..63bdb59e11dc6b 100644 --- a/playground/css-codesplit/index.html +++ b/playground/css-codesplit/index.html @@ -1,2 +1,11 @@ +

This should be red

+

This should be blue

+ +

This should be green

+

This should not be yellow

+

+

This should be yellow

+

+
diff --git a/playground/css-codesplit/inline.css b/playground/css-codesplit/inline.css new file mode 100644 index 00000000000000..b2a2b5f1ead51f --- /dev/null +++ b/playground/css-codesplit/inline.css @@ -0,0 +1,3 @@ +.inline { + color: yellow; +} diff --git a/playground/css-codesplit/main.js b/playground/css-codesplit/main.js index 8c80df2c181511..eb6e703f79e718 100644 --- a/playground/css-codesplit/main.js +++ b/playground/css-codesplit/main.js @@ -1,6 +1,15 @@ import './style.css' import './main.css' -document.getElementById( - 'app' -).innerHTML = `

This should be red

This should be blue

` +import('./async.css') + +import('./inline.css?inline').then((css) => { + document.querySelector('.dynamic-inline').textContent = css.default +}) + +import('./mod.module.css').then((css) => { + document.querySelector('.dynamic-module').textContent = JSON.stringify( + css.default + ) + document.querySelector('.mod').classList.add(css.default.mod) +}) diff --git a/playground/css-codesplit/mod.module.css b/playground/css-codesplit/mod.module.css new file mode 100644 index 00000000000000..7f84410485a32c --- /dev/null +++ b/playground/css-codesplit/mod.module.css @@ -0,0 +1,3 @@ +.mod { + color: yellow; +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 655b3273279f9e..dc22ce15960bad 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,4 +1,4 @@ -lockfileVersion: 5.3 +lockfileVersion: 5.4 overrides: vite: workspace:* @@ -53,8 +53,8 @@ importers: '@types/node': 17.0.31 '@types/prompts': 2.4.0 '@types/semver': 7.3.9 - '@typescript-eslint/eslint-plugin': 5.22.0_9817cbad956b8aa5d1e3d9ec99e4a1e4 - '@typescript-eslint/parser': 5.22.0_eslint@8.15.0+typescript@4.6.4 + '@typescript-eslint/eslint-plugin': 5.22.0_tal4xlmvnofklupd3hwjtzfb4q + '@typescript-eslint/parser': 5.22.0_hcfsmds2fshutdssjqluwm76uu conventional-changelog-cli: 2.2.2 cross-env: 7.0.3 esbuild: 0.14.38 @@ -77,8 +77,8 @@ importers: semver: 7.3.7 simple-git-hooks: 2.7.0 sirv: 2.0.2 - ts-jest: 27.1.4_edb1f862ecf73b6f0cc1f906c6266936 - ts-node: 10.7.0_5f3e12794cebfbf3197131903b74d233 + ts-jest: 27.1.4_5wy7qyxm645w6dgb7edmmjtjgy + ts-node: 10.7.0_l47be6km5p57gglrggidw5gsgm typescript: 4.6.4 vite: link:packages/vite vitepress: 0.22.4 @@ -255,7 +255,7 @@ importers: '@rollup/plugin-dynamic-import-vars': 1.4.3_rollup@2.72.1 '@rollup/plugin-json': 4.1.0_rollup@2.72.1 '@rollup/plugin-node-resolve': 13.2.1_rollup@2.72.1 - '@rollup/plugin-typescript': 8.3.2_1ca3041dc435726c0a8fcb5dcdbe7c94 + '@rollup/plugin-typescript': 8.3.2_rollup@2.72.1+tslib@2.4.0 '@rollup/pluginutils': 4.2.1 '@types/convert-source-map': 1.5.2 '@types/cross-spawn': 6.0.2 @@ -298,7 +298,7 @@ importers: periscopic: 2.0.3 picocolors: 1.0.0 postcss-import: 14.1.0_postcss@8.4.13 - postcss-load-config: 3.1.4_postcss@8.4.13+ts-node@10.7.0 + postcss-load-config: 3.1.4_postcss@8.4.13 postcss-modules: 4.3.1_postcss@8.4.13 resolve.exports: 1.1.0 rollup-plugin-license: 2.7.0_rollup@2.72.1 @@ -308,7 +308,7 @@ importers: strip-ansi: 6.0.1 strip-literal: 0.3.0 terser: 5.13.1 - tsconfck: 1.2.2_typescript@4.6.4 + tsconfck: 1.2.2 tslib: 2.4.0 types: link:types ufo: 0.8.4 @@ -328,7 +328,7 @@ importers: resolve-linked: workspace:* vue: ^3.2.33 dependencies: - aliased-module: link:dir/module + aliased-module: file:playground/alias/dir/module vue: 3.2.33 devDependencies: resolve-linked: link:../resolve-linked @@ -344,7 +344,7 @@ importers: fast-glob: ^3.2.11 tailwindcss: ^2.2.19 dependencies: - tailwindcss: 2.2.19_ts-node@10.7.0 + tailwindcss: 2.2.19 devDependencies: fast-glob: 3.2.11 @@ -410,7 +410,7 @@ importers: specifiers: pkg: file:./pkg dependencies: - pkg: link:pkg + pkg: file:playground/dynamic-import/pkg playground/dynamic-import/pkg: specifiers: {} @@ -461,7 +461,7 @@ importers: json-module: file:./json-module vue: ^3.2.33 devDependencies: - json-module: link:json-module + json-module: file:playground/json/json-module vue: 3.2.33 playground/json/json-module: @@ -560,16 +560,16 @@ importers: dependencies: axios: 0.24.0 clipboard: 2.0.11 - dep-cjs-compiled-from-cjs: link:dep-cjs-compiled-from-cjs - dep-cjs-compiled-from-esm: link:dep-cjs-compiled-from-esm - dep-esbuild-plugin-transform: link:dep-esbuild-plugin-transform + dep-cjs-compiled-from-cjs: file:playground/optimize-deps/dep-cjs-compiled-from-cjs + dep-cjs-compiled-from-esm: file:playground/optimize-deps/dep-cjs-compiled-from-esm + dep-esbuild-plugin-transform: file:playground/optimize-deps/dep-esbuild-plugin-transform dep-linked: link:dep-linked dep-linked-include: link:dep-linked-include - dep-node-env: link:dep-node-env - dep-not-js: link:dep-not-js - dep-with-dynamic-import: link:dep-with-dynamic-import + dep-node-env: file:playground/optimize-deps/dep-node-env + dep-not-js: file:playground/optimize-deps/dep-not-js + dep-with-dynamic-import: file:playground/optimize-deps/dep-with-dynamic-import lodash-es: 4.17.21 - nested-exclude: link:nested-exclude + nested-exclude: file:playground/optimize-deps/nested-exclude phoenix: 1.6.8 react: 17.0.2 react-dom: 17.0.2_react@17.0.2 @@ -624,7 +624,7 @@ importers: express: ^4.18.1 missing-dep: file:./missing-dep dependencies: - missing-dep: link:missing-dep + missing-dep: file:playground/optimize-missing-deps/missing-dep devDependencies: express: 4.18.1 @@ -632,7 +632,7 @@ importers: specifiers: multi-entry-dep: file:../multi-entry-dep dependencies: - multi-entry-dep: link:../multi-entry-dep + multi-entry-dep: file:playground/optimize-missing-deps/multi-entry-dep playground/optimize-missing-deps/multi-entry-dep: specifiers: {} @@ -681,7 +681,7 @@ importers: '@emotion/react': 11.9.0_react@17.0.2 react: 17.0.2 react-dom: 17.0.2_react@17.0.2 - react-switch: 6.0.0_react-dom@17.0.2+react@17.0.2 + react-switch: 6.0.0_sfoxds7t5ydpegc3knd667wn6m devDependencies: '@babel/plugin-proposal-pipeline-operator': 7.17.6 '@emotion/babel-plugin': 11.9.2 @@ -757,15 +757,15 @@ importers: ts-transpiled-exports: file:./ts-transpiled-exports dependencies: bcrypt: 5.0.1 - define-properties-exports: link:define-properties-exports - define-property-exports: link:define-property-exports - forwarded-export: link:forwarded-export - object-assigned-exports: link:object-assigned-exports - only-object-assigned-exports: link:only-object-assigned-exports - primitive-export: link:primitive-export - read-file-content: link:read-file-content - require-absolute: link:require-absolute - ts-transpiled-exports: link:ts-transpiled-exports + define-properties-exports: file:playground/ssr-deps/define-properties-exports + define-property-exports: file:playground/ssr-deps/define-property-exports + forwarded-export: file:playground/ssr-deps/forwarded-export + object-assigned-exports: file:playground/ssr-deps/object-assigned-exports + only-object-assigned-exports: file:playground/ssr-deps/only-object-assigned-exports + primitive-export: file:playground/ssr-deps/primitive-export + read-file-content: file:playground/ssr-deps/read-file-content + require-absolute: file:playground/ssr-deps/require-absolute + ts-transpiled-exports: file:playground/ssr-deps/ts-transpiled-exports devDependencies: cross-env: 7.0.3 express: 4.18.1 @@ -852,7 +852,7 @@ importers: vue-router: ^4.0.15 vuex: ^4.0.2 dependencies: - example-external-component: link:example-external-component + example-external-component: file:playground/ssr-vue/example-external-component vue: 3.2.33 vue-router: 4.0.15_vue@3.2.33 vuex: 4.0.2_vue@3.2.33 @@ -892,18 +892,18 @@ importers: vue-router: ^4.0.15 dependencies: autoprefixer: 10.4.7 - tailwindcss: 2.2.19_243d11a951eff552b64227a524842e97 + tailwindcss: 2.2.19_eq6rdkkr572vfnsce6ssjbbos4 vue: 3.2.33 vue-router: 4.0.15_vue@3.2.33 devDependencies: '@vitejs/plugin-vue': link:../../packages/plugin-vue - ts-node: 10.7.0_5f3e12794cebfbf3197131903b74d233 + ts-node: 10.7.0 playground/tailwind-sourcemap: specifiers: tailwindcss: ^3.0.24 dependencies: - tailwindcss: 3.0.24_ts-node@10.7.0 + tailwindcss: 3.0.24 playground/tsconfig-json: specifiers: {} @@ -1285,6 +1285,8 @@ packages: resolution: {integrity: sha512-n2Q6i+fnJqzOaq2VkdXxy2TCPCWQZHiCo0XqmrCvDWcZQKRyZzYi4Z0yxlBuN0w+r2ZHmre+Q087DSrw3pbJDQ==} engines: {node: '>=6.0.0'} hasBin: true + dependencies: + '@babel/types': 7.17.10 /@babel/plugin-proposal-pipeline-operator/7.17.6: resolution: {integrity: sha512-n1jaBJW05mRSShsMwK6ObEN9C925w3bleGZlzvPRdEJ0ZNvXoSncAJMGSzLKo7NScfZdWuLtf7BQtBMfFTHP+g==} @@ -2122,7 +2124,7 @@ packages: rollup: 2.72.1 dev: true - /@rollup/plugin-typescript/8.3.2_1ca3041dc435726c0a8fcb5dcdbe7c94: + /@rollup/plugin-typescript/8.3.2_rollup@2.72.1+tslib@2.4.0: resolution: {integrity: sha512-MtgyR5LNHZr3GyN0tM7gNO9D0CS+Y+vflS4v/PHmrX17JCkHUYKvQ5jN5o3cz1YKllM3duXUqu3yOHwMPUxhDg==} engines: {node: '>=8.0.0'} peerDependencies: @@ -2134,7 +2136,6 @@ packages: resolve: 1.22.0 rollup: 2.72.1 tslib: 2.4.0 - typescript: 4.6.4 dev: true /@rollup/pluginutils/3.1.0_rollup@2.72.1: @@ -2450,7 +2451,7 @@ packages: dev: true optional: true - /@typescript-eslint/eslint-plugin/5.22.0_9817cbad956b8aa5d1e3d9ec99e4a1e4: + /@typescript-eslint/eslint-plugin/5.22.0_tal4xlmvnofklupd3hwjtzfb4q: resolution: {integrity: sha512-YCiy5PUzpAeOPGQ7VSGDEY2NeYUV1B0swde2e0HzokRsHBYjSdF6DZ51OuRZxVPHx0032lXGLvOMls91D8FXlg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -2461,10 +2462,10 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/parser': 5.22.0_eslint@8.15.0+typescript@4.6.4 + '@typescript-eslint/parser': 5.22.0_hcfsmds2fshutdssjqluwm76uu '@typescript-eslint/scope-manager': 5.22.0 - '@typescript-eslint/type-utils': 5.22.0_eslint@8.15.0+typescript@4.6.4 - '@typescript-eslint/utils': 5.22.0_eslint@8.15.0+typescript@4.6.4 + '@typescript-eslint/type-utils': 5.22.0_hcfsmds2fshutdssjqluwm76uu + '@typescript-eslint/utils': 5.22.0_hcfsmds2fshutdssjqluwm76uu debug: 4.3.4 eslint: 8.15.0 functional-red-black-tree: 1.0.1 @@ -2477,7 +2478,7 @@ packages: - supports-color dev: true - /@typescript-eslint/parser/5.22.0_eslint@8.15.0+typescript@4.6.4: + /@typescript-eslint/parser/5.22.0_hcfsmds2fshutdssjqluwm76uu: resolution: {integrity: sha512-piwC4krUpRDqPaPbFaycN70KCP87+PC5WZmrWs+DlVOxxmF+zI6b6hETv7Quy4s9wbkV16ikMeZgXsvzwI3icQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -2505,7 +2506,7 @@ packages: '@typescript-eslint/visitor-keys': 5.22.0 dev: true - /@typescript-eslint/type-utils/5.22.0_eslint@8.15.0+typescript@4.6.4: + /@typescript-eslint/type-utils/5.22.0_hcfsmds2fshutdssjqluwm76uu: resolution: {integrity: sha512-iqfLZIsZhK2OEJ4cQ01xOq3NaCuG5FQRKyHicA3xhZxMgaxQazLUHbH/B2k9y5i7l3+o+B5ND9Mf1AWETeMISA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -2515,7 +2516,7 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/utils': 5.22.0_eslint@8.15.0+typescript@4.6.4 + '@typescript-eslint/utils': 5.22.0_hcfsmds2fshutdssjqluwm76uu debug: 4.3.4 eslint: 8.15.0 tsutils: 3.21.0_typescript@4.6.4 @@ -2550,7 +2551,7 @@ packages: - supports-color dev: true - /@typescript-eslint/utils/5.22.0_eslint@8.15.0+typescript@4.6.4: + /@typescript-eslint/utils/5.22.0_hcfsmds2fshutdssjqluwm76uu: resolution: {integrity: sha512-HodsGb037iobrWSUMS7QH6Hl1kppikjA1ELiJlNSTYf/UdMEwzgj0WIp+lBNb6WZ3zTwb0tEz51j0Wee3iJ3wQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -3080,6 +3081,8 @@ packages: raw-body: 2.5.1 type-is: 1.6.18 unpipe: 1.0.0 + transitivePeerDependencies: + - supports-color dev: true /brace-expansion/1.1.11: @@ -3454,6 +3457,8 @@ packages: on-headers: 1.0.2 safe-buffer: 5.1.2 vary: 1.1.2 + transitivePeerDependencies: + - supports-color dev: true /concat-map/0.0.1: @@ -3472,6 +3477,8 @@ packages: finalhandler: 1.1.2 parseurl: 1.3.3 utils-merge: 1.0.1 + transitivePeerDependencies: + - supports-color dev: true /console-control-strings/1.1.0: @@ -3830,18 +3837,33 @@ packages: /debug/2.6.9: resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true dependencies: ms: 2.0.0 dev: true /debug/3.1.0: resolution: {integrity: sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true dependencies: ms: 2.0.0 dev: true /debug/3.2.7: resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true dependencies: ms: 2.1.3 dev: true @@ -4653,6 +4675,8 @@ packages: type-is: 1.6.18 utils-merge: 1.0.1 vary: 1.1.2 + transitivePeerDependencies: + - supports-color dev: true /ext/1.6.0: @@ -4738,6 +4762,8 @@ packages: parseurl: 1.3.3 statuses: 1.5.0 unpipe: 1.0.0 + transitivePeerDependencies: + - supports-color dev: true /finalhandler/1.2.0: @@ -4751,6 +4777,8 @@ packages: parseurl: 1.3.3 statuses: 2.0.1 unpipe: 1.0.0 + transitivePeerDependencies: + - supports-color dev: true /find-root/1.1.0: @@ -5703,7 +5731,7 @@ packages: pretty-format: 27.5.1 slash: 3.0.0 strip-json-comments: 3.1.1 - ts-node: 10.7.0_5f3e12794cebfbf3197131903b74d233 + ts-node: 10.7.0_l47be6km5p57gglrggidw5gsgm transitivePeerDependencies: - bufferutil - canvas @@ -6244,6 +6272,8 @@ packages: mime: 1.6.0 needle: 2.9.1 source-map: 0.6.1 + transitivePeerDependencies: + - supports-color dev: true /leven/3.1.0: @@ -6580,7 +6610,7 @@ packages: engines: {node: '>=4'} dev: true - /mini-create-react-context/0.4.1_prop-types@15.8.1+react@17.0.2: + /mini-create-react-context/0.4.1_at7mkepldmzoo6silmqc5bca74: resolution: {integrity: sha512-YWCYEmd5CQeHGSAKrYvXgmzzkrvssZcuuQDDeqkT+PziKGMgE+0MCCtcKbROzocGBG1meBLl2FotlRwf4gAzbQ==} peerDependencies: prop-types: ^15.0.0 @@ -6720,6 +6750,8 @@ packages: debug: 3.2.7 iconv-lite: 0.4.24 sax: 1.2.4 + transitivePeerDependencies: + - supports-color dev: true optional: true @@ -7265,7 +7297,23 @@ packages: postcss: 8.4.13 dev: false - /postcss-load-config/3.1.4_postcss@8.4.13+ts-node@10.7.0: + /postcss-load-config/3.1.4: + resolution: {integrity: sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==} + engines: {node: '>= 10'} + peerDependencies: + postcss: '>=8.0.9' + ts-node: '>=9.0.0' + peerDependenciesMeta: + postcss: + optional: true + ts-node: + optional: true + dependencies: + lilconfig: 2.0.5 + yaml: 1.10.2 + dev: false + + /postcss-load-config/3.1.4_postcss@8.4.13: resolution: {integrity: sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==} engines: {node: '>= 10'} peerDependencies: @@ -7279,7 +7327,6 @@ packages: dependencies: lilconfig: 2.0.5 postcss: 8.4.13 - ts-node: 10.7.0_5f3e12794cebfbf3197131903b74d233 yaml: 1.10.2 /postcss-load-config/3.1.4_ts-node@10.7.0: @@ -7295,7 +7342,7 @@ packages: optional: true dependencies: lilconfig: 2.0.5 - ts-node: 10.7.0_5f3e12794cebfbf3197131903b74d233 + ts-node: 10.7.0 yaml: 1.10.2 dev: false @@ -7716,7 +7763,7 @@ packages: history: 4.10.1 hoist-non-react-statics: 3.3.2 loose-envify: 1.4.0 - mini-create-react-context: 0.4.1_prop-types@15.8.1+react@17.0.2 + mini-create-react-context: 0.4.1_at7mkepldmzoo6silmqc5bca74 path-to-regexp: 1.8.0 prop-types: 15.8.1 react: 17.0.2 @@ -7725,7 +7772,7 @@ packages: tiny-warning: 1.0.3 dev: false - /react-switch/6.0.0_react-dom@17.0.2+react@17.0.2: + /react-switch/6.0.0_sfoxds7t5ydpegc3knd667wn6m: resolution: {integrity: sha512-QV3/6eRK5/5epdQzIqvDAHRoGLbCv/wDpHUi6yBMXY1Xco5XGuIZxvB49PHoV1v/SpEgOCJLD/Zo43iic+aEIw==} peerDependencies: react: ^15.3.0 || ^16.0.0 || ^17.0.0 @@ -8082,6 +8129,8 @@ packages: on-finished: 2.4.1 range-parser: 1.2.1 statuses: 2.0.1 + transitivePeerDependencies: + - supports-color dev: true /serve-static/1.15.0: @@ -8092,6 +8141,8 @@ packages: escape-html: 1.0.3 parseurl: 1.3.3 send: 0.18.0 + transitivePeerDependencies: + - supports-color dev: true /set-blocking/2.0.0: @@ -8492,6 +8543,8 @@ packages: sax: 1.2.4 semver: 6.3.0 source-map: 0.7.3 + transitivePeerDependencies: + - supports-color dev: true /supports-color/5.5.0: @@ -8542,7 +8595,7 @@ packages: resolution: {integrity: sha512-hqTN6kW+pN6/qro6G9OZ7ceDQOcYno020zBQKpZQLsJhYTDMCMNfXi/Y8duF5iW+4WWZr42ry0MMkcRGpbwG2A==} dev: false - /tailwindcss/2.2.19_243d11a951eff552b64227a524842e97: + /tailwindcss/2.2.19: resolution: {integrity: sha512-6Ui7JSVtXadtTUo2NtkBBacobzWiQYVjYW0ZnKaP9S1ZCKQ0w7KVNz+YSDI/j7O7KCMHbOkz94ZMQhbT9pOqjw==} engines: {node: '>=12.13.0'} hasBin: true @@ -8551,7 +8604,6 @@ packages: postcss: ^8.0.9 dependencies: arg: 5.0.1 - autoprefixer: 10.4.7 bytes: 3.1.2 chalk: 4.1.2 chokidar: 3.5.3 @@ -8573,7 +8625,7 @@ packages: normalize-path: 3.0.0 object-hash: 2.2.0 postcss-js: 3.0.3 - postcss-load-config: 3.1.4_ts-node@10.7.0 + postcss-load-config: 3.1.4 postcss-nested: 5.0.6 postcss-selector-parser: 6.0.10 postcss-value-parser: 4.2.0 @@ -8587,7 +8639,7 @@ packages: - ts-node dev: false - /tailwindcss/2.2.19_ts-node@10.7.0: + /tailwindcss/2.2.19_eq6rdkkr572vfnsce6ssjbbos4: resolution: {integrity: sha512-6Ui7JSVtXadtTUo2NtkBBacobzWiQYVjYW0ZnKaP9S1ZCKQ0w7KVNz+YSDI/j7O7KCMHbOkz94ZMQhbT9pOqjw==} engines: {node: '>=12.13.0'} hasBin: true @@ -8596,6 +8648,7 @@ packages: postcss: ^8.0.9 dependencies: arg: 5.0.1 + autoprefixer: 10.4.7 bytes: 3.1.2 chalk: 4.1.2 chokidar: 3.5.3 @@ -8631,7 +8684,7 @@ packages: - ts-node dev: false - /tailwindcss/3.0.24_ts-node@10.7.0: + /tailwindcss/3.0.24: resolution: {integrity: sha512-H3uMmZNWzG6aqmg9q07ZIRNIawoiEcNFKDfL+YzOPuPsXuDXxJxB9icqzLgdzKNwjG3SAro2h9SYav8ewXNgig==} engines: {node: '>=12.13.0'} hasBin: true @@ -8651,7 +8704,7 @@ packages: picocolors: 1.0.0 postcss: 8.4.13 postcss-js: 4.0.0_postcss@8.4.13 - postcss-load-config: 3.1.4_postcss@8.4.13+ts-node@10.7.0 + postcss-load-config: 3.1.4_postcss@8.4.13 postcss-nested: 5.0.6_postcss@8.4.13 postcss-selector-parser: 6.0.10 postcss-value-parser: 4.2.0 @@ -8841,7 +8894,7 @@ packages: utf8-byte-length: 1.0.4 dev: true - /ts-jest/27.1.4_edb1f862ecf73b6f0cc1f906c6266936: + /ts-jest/27.1.4_5wy7qyxm645w6dgb7edmmjtjgy: resolution: {integrity: sha512-qjkZlVPWVctAezwsOD1OPzbZ+k7zA5z3oxII4dGdZo5ggX/PL7kvwTM0pXTr10fAtbiVpJaL3bWd502zAhpgSQ==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} hasBin: true @@ -8876,7 +8929,36 @@ packages: yargs-parser: 20.2.9 dev: true - /ts-node/10.7.0_5f3e12794cebfbf3197131903b74d233: + /ts-node/10.7.0: + resolution: {integrity: sha512-TbIGS4xgJoX2i3do417KSaep1uRAW/Lu+WAL2doDHC0D6ummjirVOXU5/7aiZotbQ5p1Zp9tP7U6cYhA0O7M8A==} + hasBin: true + peerDependencies: + '@swc/core': '>=1.2.50' + '@swc/wasm': '>=1.2.50' + '@types/node': '*' + typescript: '>=2.7' + peerDependenciesMeta: + '@swc/core': + optional: true + '@swc/wasm': + optional: true + dependencies: + '@cspotcode/source-map-support': 0.7.0 + '@tsconfig/node10': 1.0.8 + '@tsconfig/node12': 1.0.9 + '@tsconfig/node14': 1.0.1 + '@tsconfig/node16': 1.0.2 + acorn: 8.7.1 + acorn-walk: 8.2.0 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.2 + make-error: 1.3.6 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 + dev: true + + /ts-node/10.7.0_l47be6km5p57gglrggidw5gsgm: resolution: {integrity: sha512-TbIGS4xgJoX2i3do417KSaep1uRAW/Lu+WAL2doDHC0D6ummjirVOXU5/7aiZotbQ5p1Zp9tP7U6cYhA0O7M8A==} hasBin: true peerDependencies: @@ -8907,7 +8989,7 @@ packages: yn: 3.1.1 dev: true - /tsconfck/1.2.2_typescript@4.6.4: + /tsconfck/1.2.2: resolution: {integrity: sha512-x5YpjOqjJnMs1EsJvQBQbrysrY32eGoZRRr5YvbN1hwlrXKc7jiphCOUrT7xbFdOWk8sh+EtMYbGPbTO8rDmcw==} engines: {node: ^12.20 || ^14.13.1 || >= 16} hasBin: true @@ -8916,8 +8998,6 @@ packages: peerDependenciesMeta: typescript: optional: true - dependencies: - typescript: 4.6.4 dev: true /tslib/1.14.1: @@ -9493,3 +9573,139 @@ packages: optionalDependencies: commander: 2.20.3 dev: true + + file:playground/alias/dir/module: + resolution: {directory: playground/alias/dir/module, type: directory} + name: '@vite/aliased-module' + version: 0.0.0 + dev: false + + file:playground/dynamic-import/pkg: + resolution: {directory: playground/dynamic-import/pkg, type: directory} + name: pkg + version: 1.0.0 + dev: false + + file:playground/json/json-module: + resolution: {directory: playground/json/json-module, type: directory} + name: json-module + version: 0.0.0 + dev: true + + file:playground/optimize-deps/dep-cjs-compiled-from-cjs: + resolution: {directory: playground/optimize-deps/dep-cjs-compiled-from-cjs, type: directory} + name: dep-cjs-compiled-from-cjs + version: 0.0.0 + dev: false + + file:playground/optimize-deps/dep-cjs-compiled-from-esm: + resolution: {directory: playground/optimize-deps/dep-cjs-compiled-from-esm, type: directory} + name: dep-cjs-compiled-from-esm + version: 0.0.0 + dev: false + + file:playground/optimize-deps/dep-esbuild-plugin-transform: + resolution: {directory: playground/optimize-deps/dep-esbuild-plugin-transform, type: directory} + name: dep-esbuild-plugin-transform + version: 0.0.0 + dev: false + + file:playground/optimize-deps/dep-node-env: + resolution: {directory: playground/optimize-deps/dep-node-env, type: directory} + name: dep-node-env + version: 1.0.0 + dev: false + + file:playground/optimize-deps/dep-not-js: + resolution: {directory: playground/optimize-deps/dep-not-js, type: directory} + name: dep-not-js + version: 1.0.0 + dev: false + + file:playground/optimize-deps/dep-with-dynamic-import: + resolution: {directory: playground/optimize-deps/dep-with-dynamic-import, type: directory} + name: dep-with-dynamic-import + version: 0.0.0 + dev: false + + file:playground/optimize-deps/nested-exclude: + resolution: {directory: playground/optimize-deps/nested-exclude, type: directory} + name: nested-exclude + version: 1.0.0 + dependencies: + nested-include: link:nested-include + dev: false + + file:playground/optimize-missing-deps/missing-dep: + resolution: {directory: playground/optimize-missing-deps/missing-dep, type: directory} + name: missing-dep + version: 0.0.0 + dependencies: + multi-entry-dep: file:playground/optimize-missing-deps/multi-entry-dep + dev: false + + file:playground/optimize-missing-deps/multi-entry-dep: + resolution: {directory: playground/optimize-missing-deps/multi-entry-dep, type: directory} + name: multi-entry-dep + version: 0.0.0 + dev: false + + file:playground/ssr-deps/define-properties-exports: + resolution: {directory: playground/ssr-deps/define-properties-exports, type: directory} + name: define-properties-exports + version: 0.0.0 + dev: false + + file:playground/ssr-deps/define-property-exports: + resolution: {directory: playground/ssr-deps/define-property-exports, type: directory} + name: define-property-exports + version: 0.0.0 + dev: false + + file:playground/ssr-deps/forwarded-export: + resolution: {directory: playground/ssr-deps/forwarded-export, type: directory} + name: forwarded-export + version: 0.0.0 + dev: false + + file:playground/ssr-deps/object-assigned-exports: + resolution: {directory: playground/ssr-deps/object-assigned-exports, type: directory} + name: object-assigned-exports + version: 0.0.0 + dev: false + + file:playground/ssr-deps/only-object-assigned-exports: + resolution: {directory: playground/ssr-deps/only-object-assigned-exports, type: directory} + name: only-object-assigned-exports + version: 0.0.0 + dev: false + + file:playground/ssr-deps/primitive-export: + resolution: {directory: playground/ssr-deps/primitive-export, type: directory} + name: primitive-export + version: 0.0.0 + dev: false + + file:playground/ssr-deps/read-file-content: + resolution: {directory: playground/ssr-deps/read-file-content, type: directory} + name: read-file-content + version: 0.0.0 + dev: false + + file:playground/ssr-deps/require-absolute: + resolution: {directory: playground/ssr-deps/require-absolute, type: directory} + name: require-absolute + version: 0.0.0 + dev: false + + file:playground/ssr-deps/ts-transpiled-exports: + resolution: {directory: playground/ssr-deps/ts-transpiled-exports, type: directory} + name: ts-transpiled-exports + version: 0.0.0 + dev: false + + file:playground/ssr-vue/example-external-component: + resolution: {directory: playground/ssr-vue/example-external-component, type: directory} + name: example-external-component + version: 0.0.0 + dev: false