├── .editorconfig ├── .git-blame-ignore-revs ├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.yml │ ├── config.yml │ ├── docs.yml │ └── feature_request.yml ├── PULL_REQUEST_TEMPLATE.md ├── commit-convention.md ├── renovate.json5 └── workflows │ ├── ci.yml │ ├── ecosystem-ci-trigger.yml │ ├── issue-close-require.yml │ ├── issue-labeled.yml │ ├── lock-closed-issues.yml │ ├── preview-release.yml │ ├── publish.yml │ ├── release-tag.yml │ └── semantic-pull-request.yml ├── .gitignore ├── .npmrc ├── .prettierignore ├── .prettierrc.json ├── .stackblitz └── codeflow.json ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── docs ├── .vitepress │ ├── buildEnd.config.ts │ ├── config.ts │ ├── theme │ │ ├── components │ │ │ ├── AsideSponsors.vue │ │ │ ├── BlogIndex.vue │ │ │ ├── SvgImage.vue │ │ │ ├── YouTubeVideo.vue │ │ │ └── landing │ │ │ │ ├── 1. hero-section │ │ │ │ ├── HeroDiagram.vue │ │ │ │ ├── HeroSection.vue │ │ │ │ └── svg-elements │ │ │ │ │ ├── SvgBlueIndicator.vue │ │ │ │ │ ├── SvgInputs.vue │ │ │ │ │ ├── SvgOutputs.vue │ │ │ │ │ └── SvgPinkIndicator.vue │ │ │ │ ├── 2. feature-section │ │ │ │ ├── FeatureCI.vue │ │ │ │ ├── FeatureFlexiblePlugins.vue │ │ │ │ ├── FeatureHMR.vue │ │ │ │ ├── FeatureInstantServerStart.vue │ │ │ │ ├── FeatureOptimizedBuild.vue │ │ │ │ ├── FeatureRichFeatures.vue │ │ │ │ ├── FeatureSSRSupport.vue │ │ │ │ ├── FeatureSection.vue │ │ │ │ ├── FeatureTypedAPI.vue │ │ │ │ └── images │ │ │ │ │ ├── css3.svg │ │ │ │ │ ├── js.svg │ │ │ │ │ ├── json.svg │ │ │ │ │ ├── postcss.svg │ │ │ │ │ ├── ts.svg │ │ │ │ │ └── wa.svg │ │ │ │ ├── 3. frameworks-section │ │ │ │ ├── FrameworkCard.vue │ │ │ │ ├── FrameworksSection.vue │ │ │ │ └── images │ │ │ │ │ ├── adonis.svg │ │ │ │ │ ├── analog.svg │ │ │ │ │ ├── angular.svg │ │ │ │ │ ├── astro.svg │ │ │ │ │ ├── ember.svg │ │ │ │ │ ├── hono.svg │ │ │ │ │ ├── laravel.svg │ │ │ │ │ ├── marko.svg │ │ │ │ │ ├── nuxt.svg │ │ │ │ │ ├── playwright.svg │ │ │ │ │ ├── preact.svg │ │ │ │ │ ├── qwik.svg │ │ │ │ │ ├── react.svg │ │ │ │ │ ├── redwood.svg │ │ │ │ │ ├── remix.svg │ │ │ │ │ ├── solid.svg │ │ │ │ │ ├── storybook.svg │ │ │ │ │ ├── svelte.svg │ │ │ │ │ ├── vitest.svg │ │ │ │ │ └── vue.svg │ │ │ │ ├── 4. community-section │ │ │ │ ├── CommunityCard.vue │ │ │ │ └── CommunitySection.vue │ │ │ │ ├── 5. sponsor-section │ │ │ │ └── SponsorSection.vue │ │ │ │ ├── 6. get-started-section │ │ │ │ └── GetStartedSection.vue │ │ │ │ └── common │ │ │ │ └── SvgNode.vue │ │ ├── composables │ │ │ ├── sponsor.ts │ │ │ ├── useCardAnimation.ts │ │ │ └── useSlideIn.ts │ │ ├── index.ts │ │ └── styles │ │ │ ├── landing.css │ │ │ └── vars.css │ ├── tsconfig.json │ └── vite-env.d.ts ├── _data │ ├── blog.data.ts │ └── team.js ├── blog.md ├── blog │ ├── announcing-vite2.md │ ├── announcing-vite3.md │ ├── announcing-vite4-3.md │ ├── announcing-vite4.md │ ├── announcing-vite5-1.md │ ├── announcing-vite5.md │ └── announcing-vite6.md ├── changes │ ├── hotupdate-hook.md │ ├── index.md │ ├── per-environment-apis.md │ ├── shared-plugins-during-build.md │ ├── ssr-using-modulerunner.md │ └── this-environment-in-hooks.md ├── config │ ├── build-options.md │ ├── dep-optimization-options.md │ ├── index.md │ ├── preview-options.md │ ├── server-options.md │ ├── shared-options.md │ ├── ssr-options.md │ └── worker-options.md ├── guide │ ├── api-environment-frameworks.md │ ├── api-environment-instances.md │ ├── api-environment-plugins.md │ ├── api-environment-runtimes.md │ ├── api-environment.md │ ├── api-hmr.md │ ├── api-javascript.md │ ├── api-plugin.md │ ├── assets.md │ ├── backend-integration.md │ ├── build.md │ ├── cli.md │ ├── dep-pre-bundling.md │ ├── env-and-mode.md │ ├── features.md │ ├── index.md │ ├── migration.md │ ├── performance.md │ ├── philosophy.md │ ├── rolldown.md │ ├── ssr.md │ ├── static-deploy-github-pages.yaml │ ├── static-deploy.md │ ├── troubleshooting.md │ ├── using-plugins.md │ └── why.md ├── images │ ├── bundler.svg │ ├── community │ │ └── placeholder.jpg │ ├── diagrams.fig │ ├── esm.svg │ ├── graph.svg │ ├── lit.svg │ ├── preact.svg │ ├── react.svg │ ├── svelte.svg │ ├── v3-docs.png │ ├── v3-new-open-issues-and-PRs.png │ ├── v3-open-issues-and-PRs.png │ ├── vercel-configuration.png │ ├── vite-3-cold-start.svg │ ├── vite-environments.svg │ ├── vite-plugin-inspect.png │ ├── vite.svg │ └── vue.svg ├── index.md ├── package.json ├── plugins │ └── index.md ├── public │ ├── _headers │ ├── _redirects │ ├── astro.svg │ ├── bolt.svg │ ├── ecosystem-vite4.png │ ├── github.svg │ ├── heart.svg │ ├── logo-home.svg │ ├── logo-uwu.png │ ├── logo-with-shadow.png │ ├── logo.svg │ ├── noise.png │ ├── nuxtlabs.svg │ ├── og-image-announcing-vite3.png │ ├── og-image-announcing-vite4-3.png │ ├── og-image-announcing-vite4.png │ ├── og-image-announcing-vite5-1.png │ ├── og-image-announcing-vite5.png │ ├── og-image-announcing-vite6.png │ ├── og-image.jpg │ ├── stackblitz.svg │ ├── vite.mp3 │ ├── vite4-3-hmr-time.png │ ├── vite4-3-startup-time.png │ ├── vite5-1-10K-modules-loading-time.png │ ├── vite6-npm-weekly-downloads.png │ ├── viteconf.svg │ ├── voice.svg │ └── voidzero.svg ├── releases.md └── team.md ├── eslint.config.js ├── netlify.toml ├── package.json ├── packages ├── create-vite │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── __tests__ │ │ └── cli.spec.ts │ ├── index.js │ ├── package.json │ ├── src │ │ └── index.ts │ ├── template-lit-ts │ │ ├── _gitignore │ │ ├── index.html │ │ ├── package.json │ │ ├── public │ │ │ └── vite.svg │ │ ├── src │ │ │ ├── assets │ │ │ │ └── lit.svg │ │ │ ├── index.css │ │ │ ├── my-element.ts │ │ │ └── vite-env.d.ts │ │ └── tsconfig.json │ ├── template-lit │ │ ├── _gitignore │ │ ├── index.html │ │ ├── package.json │ │ ├── public │ │ │ └── vite.svg │ │ └── src │ │ │ ├── assets │ │ │ └── lit.svg │ │ │ ├── index.css │ │ │ └── my-element.js │ ├── template-preact-ts │ │ ├── _gitignore │ │ ├── index.html │ │ ├── package.json │ │ ├── public │ │ │ └── vite.svg │ │ ├── src │ │ │ ├── app.css │ │ │ ├── app.tsx │ │ │ ├── assets │ │ │ │ └── preact.svg │ │ │ ├── index.css │ │ │ ├── main.tsx │ │ │ └── vite-env.d.ts │ │ ├── tsconfig.app.json │ │ ├── tsconfig.json │ │ ├── tsconfig.node.json │ │ └── vite.config.ts │ ├── template-preact │ │ ├── _gitignore │ │ ├── index.html │ │ ├── package.json │ │ ├── public │ │ │ └── vite.svg │ │ ├── src │ │ │ ├── app.css │ │ │ ├── app.jsx │ │ │ ├── assets │ │ │ │ └── preact.svg │ │ │ ├── index.css │ │ │ └── main.jsx │ │ └── vite.config.js │ ├── template-qwik-ts │ │ ├── README.md │ │ ├── _gitignore │ │ ├── index.html │ │ ├── package.json │ │ ├── public │ │ │ └── vite.svg │ │ ├── src │ │ │ ├── app.css │ │ │ ├── app.tsx │ │ │ ├── assets │ │ │ │ └── qwik.svg │ │ │ ├── index.css │ │ │ ├── main.tsx │ │ │ └── vite-env.d.ts │ │ ├── tsconfig.app.json │ │ ├── tsconfig.json │ │ ├── tsconfig.node.json │ │ └── vite.config.ts │ ├── template-qwik │ │ ├── README.md │ │ ├── _gitignore │ │ ├── index.html │ │ ├── package.json │ │ ├── public │ │ │ └── vite.svg │ │ ├── src │ │ │ ├── app.css │ │ │ ├── app.jsx │ │ │ ├── assets │ │ │ │ └── qwik.svg │ │ │ ├── index.css │ │ │ ├── main.jsx │ │ │ └── vite-env.d.ts │ │ └── vite.config.js │ ├── template-react-ts │ │ ├── README.md │ │ ├── _gitignore │ │ ├── eslint.config.js │ │ ├── index.html │ │ ├── package.json │ │ ├── public │ │ │ └── vite.svg │ │ ├── src │ │ │ ├── App.css │ │ │ ├── App.tsx │ │ │ ├── assets │ │ │ │ └── react.svg │ │ │ ├── index.css │ │ │ ├── main.tsx │ │ │ └── vite-env.d.ts │ │ ├── tsconfig.app.json │ │ ├── tsconfig.json │ │ ├── tsconfig.node.json │ │ └── vite.config.ts │ ├── template-react │ │ ├── README.md │ │ ├── _gitignore │ │ ├── eslint.config.js │ │ ├── index.html │ │ ├── package.json │ │ ├── public │ │ │ └── vite.svg │ │ ├── src │ │ │ ├── App.css │ │ │ ├── App.jsx │ │ │ ├── assets │ │ │ │ └── react.svg │ │ │ ├── index.css │ │ │ └── main.jsx │ │ └── vite.config.js │ ├── template-solid-ts │ │ ├── README.md │ │ ├── _gitignore │ │ ├── index.html │ │ ├── package.json │ │ ├── public │ │ │ └── vite.svg │ │ ├── src │ │ │ ├── App.css │ │ │ ├── App.tsx │ │ │ ├── assets │ │ │ │ └── solid.svg │ │ │ ├── index.css │ │ │ ├── index.tsx │ │ │ └── vite-env.d.ts │ │ ├── tsconfig.app.json │ │ ├── tsconfig.json │ │ ├── tsconfig.node.json │ │ └── vite.config.ts │ ├── template-solid │ │ ├── README.md │ │ ├── _gitignore │ │ ├── index.html │ │ ├── package.json │ │ ├── public │ │ │ └── vite.svg │ │ ├── src │ │ │ ├── App.css │ │ │ ├── App.jsx │ │ │ ├── assets │ │ │ │ └── solid.svg │ │ │ ├── index.css │ │ │ └── index.jsx │ │ └── vite.config.js │ ├── template-svelte-ts │ │ ├── .vscode │ │ │ └── extensions.json │ │ ├── README.md │ │ ├── _gitignore │ │ ├── index.html │ │ ├── package.json │ │ ├── public │ │ │ └── vite.svg │ │ ├── src │ │ │ ├── App.svelte │ │ │ ├── app.css │ │ │ ├── assets │ │ │ │ └── svelte.svg │ │ │ ├── lib │ │ │ │ └── Counter.svelte │ │ │ ├── main.ts │ │ │ └── vite-env.d.ts │ │ ├── svelte.config.js │ │ ├── tsconfig.app.json │ │ ├── tsconfig.json │ │ ├── tsconfig.node.json │ │ └── vite.config.ts │ ├── template-svelte │ │ ├── .vscode │ │ │ └── extensions.json │ │ ├── README.md │ │ ├── _gitignore │ │ ├── index.html │ │ ├── jsconfig.json │ │ ├── package.json │ │ ├── public │ │ │ └── vite.svg │ │ ├── src │ │ │ ├── App.svelte │ │ │ ├── app.css │ │ │ ├── assets │ │ │ │ └── svelte.svg │ │ │ ├── lib │ │ │ │ └── Counter.svelte │ │ │ ├── main.js │ │ │ └── vite-env.d.ts │ │ ├── svelte.config.js │ │ └── vite.config.js │ ├── template-vanilla-ts │ │ ├── _gitignore │ │ ├── index.html │ │ ├── package.json │ │ ├── public │ │ │ └── vite.svg │ │ ├── src │ │ │ ├── counter.ts │ │ │ ├── main.ts │ │ │ ├── style.css │ │ │ ├── typescript.svg │ │ │ └── vite-env.d.ts │ │ └── tsconfig.json │ ├── template-vanilla │ │ ├── _gitignore │ │ ├── index.html │ │ ├── package.json │ │ ├── public │ │ │ └── vite.svg │ │ └── src │ │ │ ├── counter.js │ │ │ ├── javascript.svg │ │ │ ├── main.js │ │ │ └── style.css │ ├── template-vue-ts │ │ ├── .vscode │ │ │ └── extensions.json │ │ ├── README.md │ │ ├── _gitignore │ │ ├── index.html │ │ ├── package.json │ │ ├── public │ │ │ └── vite.svg │ │ ├── src │ │ │ ├── App.vue │ │ │ ├── assets │ │ │ │ └── vue.svg │ │ │ ├── components │ │ │ │ └── HelloWorld.vue │ │ │ ├── main.ts │ │ │ ├── style.css │ │ │ └── vite-env.d.ts │ │ ├── tsconfig.app.json │ │ ├── tsconfig.json │ │ ├── tsconfig.node.json │ │ └── vite.config.ts │ ├── template-vue │ │ ├── .vscode │ │ │ └── extensions.json │ │ ├── README.md │ │ ├── _gitignore │ │ ├── index.html │ │ ├── package.json │ │ ├── public │ │ │ └── vite.svg │ │ ├── src │ │ │ ├── App.vue │ │ │ ├── assets │ │ │ │ └── vue.svg │ │ │ ├── components │ │ │ │ └── HelloWorld.vue │ │ │ ├── main.js │ │ │ └── style.css │ │ └── vite.config.js │ ├── tsconfig.json │ └── tsdown.config.ts ├── plugin-legacy │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── package.json │ ├── src │ │ ├── __tests__ │ │ │ ├── readme.spec.ts │ │ │ └── snippets.spec.ts │ │ ├── index.ts │ │ ├── snippets.ts │ │ └── types.ts │ ├── tsconfig.json │ └── tsdown.config.ts └── vite │ ├── CHANGELOG.md │ ├── LICENSE.md │ ├── README.md │ ├── bin │ ├── openChrome.applescript │ └── vite.js │ ├── client.d.ts │ ├── misc │ ├── false.d.ts │ ├── false.js │ ├── true.d.ts │ └── true.js │ ├── package.json │ ├── rolldown.config.ts │ ├── rolldown.dts.config.ts │ ├── rollupLicensePlugin.ts │ ├── scripts │ └── generateTarget.ts │ ├── src │ ├── client │ │ ├── client.ts │ │ ├── env.ts │ │ ├── overlay.ts │ │ └── tsconfig.json │ ├── module-runner │ │ ├── constants.ts │ │ ├── esmEvaluator.ts │ │ ├── evaluatedModules.ts │ │ ├── hmrHandler.ts │ │ ├── hmrLogger.ts │ │ ├── index.ts │ │ ├── runner.ts │ │ ├── sourcemap │ │ │ ├── decoder.ts │ │ │ ├── index.ts │ │ │ └── interceptor.ts │ │ ├── tsconfig.json │ │ ├── types.ts │ │ └── utils.ts │ ├── node │ │ ├── __tests__ │ │ │ ├── __snapshots__ │ │ │ │ └── utils.spec.ts.snap │ │ │ ├── assetSource.spec.ts │ │ │ ├── build.spec.ts │ │ │ ├── config.spec.ts │ │ │ ├── constants.spec.ts │ │ │ ├── dev.spec.ts │ │ │ ├── env.spec.ts │ │ │ ├── env │ │ │ │ ├── .env │ │ │ │ ├── .env.development │ │ │ │ ├── .env.development2 │ │ │ │ ├── .env.existing │ │ │ │ ├── .env.production │ │ │ │ └── .env.testing │ │ │ ├── environment.spec.ts │ │ │ ├── external.spec.ts │ │ │ ├── fixtures │ │ │ │ ├── cjs-ssr-dep │ │ │ │ │ ├── index.js │ │ │ │ │ └── package.json │ │ │ │ ├── config │ │ │ │ │ ├── entry │ │ │ │ │ │ ├── imports-field.ts │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ ├── vite.config.import-attributes.ts │ │ │ │ │ │ └── vite.config.ts │ │ │ │ │ ├── loadConfigFromFile │ │ │ │ │ │ └── .gitkeep │ │ │ │ │ ├── native-import │ │ │ │ │ │ └── basic.js │ │ │ │ │ ├── plugin-module-condition │ │ │ │ │ │ ├── index.cjs │ │ │ │ │ │ ├── index.d.ts │ │ │ │ │ │ ├── index.mjs │ │ │ │ │ │ ├── module.mjs │ │ │ │ │ │ └── package.json │ │ │ │ │ └── siblings │ │ │ │ │ │ ├── foo.ts │ │ │ │ │ │ └── package.json │ │ │ │ ├── dynamic-import │ │ │ │ │ ├── dep.mjs │ │ │ │ │ └── entry.mjs │ │ │ │ ├── emit-assets │ │ │ │ │ ├── css-module.module.css │ │ │ │ │ ├── css-normal.css │ │ │ │ │ └── entry.mjs │ │ │ │ ├── environment-alias │ │ │ │ │ ├── test.client.js │ │ │ │ │ ├── test.rsc.js │ │ │ │ │ └── test.ssr.js │ │ │ │ ├── file-url │ │ │ │ │ ├── entry.js │ │ │ │ │ └── package.json │ │ │ │ ├── runner-import │ │ │ │ │ ├── basic.ts │ │ │ │ │ ├── cjs.js │ │ │ │ │ ├── dynamic-import-dep.ts │ │ │ │ │ ├── dynamic-import.ts │ │ │ │ │ ├── plugin.ts │ │ │ │ │ ├── vite.config.outside-pkg-import.mts │ │ │ │ │ └── vite.config.ts │ │ │ │ ├── shared-plugins │ │ │ │ │ └── minify │ │ │ │ │ │ └── entry.js │ │ │ │ ├── test-dep-conditions-app │ │ │ │ │ ├── entry-with-module.js │ │ │ │ │ ├── entry.css │ │ │ │ │ └── entry.js │ │ │ │ ├── test-dep-conditions │ │ │ │ │ ├── dir │ │ │ │ │ │ ├── index.default.js │ │ │ │ │ │ └── index.module.js │ │ │ │ │ ├── index.browser.js │ │ │ │ │ ├── index.css │ │ │ │ │ ├── index.custom1.js │ │ │ │ │ ├── index.default.js │ │ │ │ │ ├── index.worker.js │ │ │ │ │ └── package.json │ │ │ │ ├── watch-rebuild-manifest │ │ │ │ │ ├── dep.js │ │ │ │ │ ├── entry.js │ │ │ │ │ └── package.json │ │ │ │ └── worker-dynamic │ │ │ │ │ ├── dynamic.js │ │ │ │ │ ├── main.js │ │ │ │ │ └── worker.js │ │ │ ├── package.json │ │ │ ├── packages │ │ │ │ ├── build-project │ │ │ │ │ └── index.html │ │ │ │ ├── child │ │ │ │ │ ├── index.js │ │ │ │ │ └── package.json │ │ │ │ ├── module │ │ │ │ │ └── package.json │ │ │ │ ├── name │ │ │ │ │ └── package.json │ │ │ │ ├── noname │ │ │ │ │ └── package.json │ │ │ │ ├── package.json │ │ │ │ └── parent │ │ │ │ │ ├── index.ts │ │ │ │ │ └── package.json │ │ │ ├── plugins │ │ │ │ ├── assetImportMetaUrl.spec.ts │ │ │ │ ├── css.spec.ts │ │ │ │ ├── define.spec.ts │ │ │ │ ├── dynamicImportVar │ │ │ │ │ ├── __snapshots__ │ │ │ │ │ │ └── parse.spec.ts.snap │ │ │ │ │ ├── mods │ │ │ │ │ │ ├── hello.js │ │ │ │ │ │ └── hi.js │ │ │ │ │ └── parse.spec.ts │ │ │ │ ├── esbuild.spec.ts │ │ │ │ ├── fixtures │ │ │ │ │ └── css-module-compose │ │ │ │ │ │ └── css │ │ │ │ │ │ └── bar.module.css │ │ │ │ ├── hooks.spec.ts │ │ │ │ ├── import.spec.ts │ │ │ │ ├── importGlob │ │ │ │ │ ├── __snapshots__ │ │ │ │ │ │ └── fixture.spec.ts.snap │ │ │ │ │ ├── fixture-a │ │ │ │ │ │ ├── .gitignore │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ ├── modules │ │ │ │ │ │ │ ├── a.ts │ │ │ │ │ │ │ ├── b.ts │ │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ ├── node_modules │ │ │ │ │ │ │ └── framework │ │ │ │ │ │ │ │ └── pages │ │ │ │ │ │ │ │ └── hello.page.js │ │ │ │ │ │ └── sibling.ts │ │ │ │ │ ├── fixture-b │ │ │ │ │ │ ├── a.ts │ │ │ │ │ │ ├── b.ts │ │ │ │ │ │ └── index.ts │ │ │ │ │ ├── fixture.spec.ts │ │ │ │ │ ├── parse.spec.ts │ │ │ │ │ └── utils.spec.ts │ │ │ │ ├── index.spec.ts │ │ │ │ ├── json.spec.ts │ │ │ │ ├── modulePreloadPolyfill │ │ │ │ │ ├── __snapshots__ │ │ │ │ │ │ └── modulePreloadPolyfill.spec.ts.snap │ │ │ │ │ └── modulePreloadPolyfill.spec.ts │ │ │ │ ├── pluginFilter.spec.ts │ │ │ │ ├── terser.spec.ts │ │ │ │ └── workerImportMetaUrl.spec.ts │ │ │ ├── resolve.spec.ts │ │ │ ├── runnerImport.spec.ts │ │ │ ├── scan.spec.ts │ │ │ ├── utils.spec.ts │ │ │ └── utils │ │ │ │ └── isFileReadable │ │ │ │ └── permission-test-file │ │ ├── __tests_dts__ │ │ │ ├── config.ts │ │ │ ├── plugin.ts │ │ │ ├── typeOptions.ts │ │ │ └── utils.ts │ │ ├── assetSource.ts │ │ ├── baseEnvironment.ts │ │ ├── build.ts │ │ ├── cli.ts │ │ ├── config.ts │ │ ├── constants.ts │ │ ├── deprecations.ts │ │ ├── env.ts │ │ ├── environment.ts │ │ ├── external.ts │ │ ├── http.ts │ │ ├── idResolver.ts │ │ ├── index.ts │ │ ├── logger.ts │ │ ├── optimizer │ │ │ ├── esbuildDepPlugin.ts │ │ │ ├── index.ts │ │ │ ├── optimizer.ts │ │ │ ├── resolve.ts │ │ │ └── scan.ts │ │ ├── packages.ts │ │ ├── plugin.ts │ │ ├── plugins │ │ │ ├── asset.ts │ │ │ ├── assetImportMetaUrl.ts │ │ │ ├── clientInjections.ts │ │ │ ├── completeSystemWrap.ts │ │ │ ├── css.ts │ │ │ ├── dataUri.ts │ │ │ ├── define.ts │ │ │ ├── dynamicImportVars.ts │ │ │ ├── esbuild.ts │ │ │ ├── html.ts │ │ │ ├── importAnalysis.ts │ │ │ ├── importAnalysisBuild.ts │ │ │ ├── importMetaGlob.ts │ │ │ ├── index.ts │ │ │ ├── json.ts │ │ │ ├── loadFallback.ts │ │ │ ├── manifest.ts │ │ │ ├── metadata.ts │ │ │ ├── modulePreloadPolyfill.ts │ │ │ ├── optimizedDeps.ts │ │ │ ├── pluginFilter.ts │ │ │ ├── preAlias.ts │ │ │ ├── reporter.ts │ │ │ ├── resolve.ts │ │ │ ├── terser.ts │ │ │ ├── wasm.ts │ │ │ ├── worker.ts │ │ │ └── workerImportMetaUrl.ts │ │ ├── preview.ts │ │ ├── publicDir.ts │ │ ├── server │ │ │ ├── __tests__ │ │ │ │ ├── fixtures │ │ │ │ │ ├── lerna │ │ │ │ │ │ ├── lerna.json │ │ │ │ │ │ └── nested │ │ │ │ │ │ │ └── package.json │ │ │ │ │ ├── none │ │ │ │ │ │ └── nested │ │ │ │ │ │ │ └── package.json │ │ │ │ │ ├── pnpm │ │ │ │ │ │ ├── nested │ │ │ │ │ │ │ └── package.json │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ └── pnpm-workspace.yaml │ │ │ │ │ ├── watcher │ │ │ │ │ │ ├── config-deps │ │ │ │ │ │ │ └── foo.js │ │ │ │ │ │ ├── custom-env │ │ │ │ │ │ │ └── .env │ │ │ │ │ │ ├── custom-public │ │ │ │ │ │ │ └── foo.txt │ │ │ │ │ │ ├── nested-root │ │ │ │ │ │ │ └── vite.config.js │ │ │ │ │ │ └── package.json │ │ │ │ │ └── yarn │ │ │ │ │ │ ├── nested │ │ │ │ │ │ └── package.json │ │ │ │ │ │ └── package.json │ │ │ │ ├── moduleGraph.spec.ts │ │ │ │ ├── pluginContainer.spec.ts │ │ │ │ ├── search-root.spec.ts │ │ │ │ └── watcher.spec.ts │ │ │ ├── environment.ts │ │ │ ├── environments │ │ │ │ ├── fetchableEnvironments.ts │ │ │ │ └── runnableEnvironment.ts │ │ │ ├── hmr.ts │ │ │ ├── index.ts │ │ │ ├── middlewares │ │ │ │ ├── __tests__ │ │ │ │ │ └── hostCheck.spec.ts │ │ │ │ ├── base.ts │ │ │ │ ├── error.ts │ │ │ │ ├── hostCheck.ts │ │ │ │ ├── htmlFallback.ts │ │ │ │ ├── indexHtml.ts │ │ │ │ ├── notFound.ts │ │ │ │ ├── proxy.ts │ │ │ │ ├── rejectInvalidRequest.ts │ │ │ │ ├── static.ts │ │ │ │ ├── time.ts │ │ │ │ └── transform.ts │ │ │ ├── mixedModuleGraph.ts │ │ │ ├── moduleGraph.ts │ │ │ ├── openBrowser.ts │ │ │ ├── pluginContainer.ts │ │ │ ├── searchRoot.ts │ │ │ ├── send.ts │ │ │ ├── sourcemap.ts │ │ │ ├── transformRequest.ts │ │ │ ├── warmup.ts │ │ │ └── ws.ts │ │ ├── shortcuts.ts │ │ ├── ssr │ │ │ ├── __tests__ │ │ │ │ ├── __snapshots__ │ │ │ │ │ └── ssrLoadModule.spec.ts.snap │ │ │ │ ├── fixtures │ │ │ │ │ ├── bundled-with-sourcemaps │ │ │ │ │ │ ├── bundle.js │ │ │ │ │ │ └── bundle.js.map │ │ │ │ │ ├── errors │ │ │ │ │ │ ├── syntax-error-dep.js │ │ │ │ │ │ ├── syntax-error-dep.ts │ │ │ │ │ │ ├── syntax-error.js │ │ │ │ │ │ └── syntax-error.ts │ │ │ │ │ ├── file-url │ │ │ │ │ │ ├── test space.js │ │ │ │ │ │ └── test.js │ │ │ │ │ ├── global │ │ │ │ │ │ ├── export.js │ │ │ │ │ │ └── test.js │ │ │ │ │ ├── json │ │ │ │ │ │ └── test.json │ │ │ │ │ ├── modules │ │ │ │ │ │ ├── has-error.js │ │ │ │ │ │ ├── has-invalid-import.js │ │ │ │ │ │ └── import-meta.js │ │ │ │ │ ├── multi-source-sourcemaps │ │ │ │ │ │ ├── dist.js │ │ │ │ │ │ ├── dist.js.map │ │ │ │ │ │ ├── entrypoint.js │ │ │ │ │ │ └── nested-directory │ │ │ │ │ │ │ └── nested-file.js │ │ │ │ │ └── named-overwrite-all │ │ │ │ │ │ ├── dep1.js │ │ │ │ │ │ ├── dep2.js │ │ │ │ │ │ └── main.js │ │ │ │ ├── ssrLoadModule.spec.ts │ │ │ │ ├── ssrStacktrace.spec.ts │ │ │ │ └── ssrTransform.spec.ts │ │ │ ├── fetchModule.ts │ │ │ ├── index.ts │ │ │ ├── runnerImport.ts │ │ │ ├── runtime │ │ │ │ ├── __tests__ │ │ │ │ │ ├── fixtures │ │ │ │ │ │ ├── a.ts │ │ │ │ │ │ ├── assets.js │ │ │ │ │ │ ├── assets │ │ │ │ │ │ │ ├── placeholder.mov │ │ │ │ │ │ │ ├── placeholder.png │ │ │ │ │ │ │ ├── placeholder.txt │ │ │ │ │ │ │ └── placeholder.webp │ │ │ │ │ │ ├── b.ts │ │ │ │ │ │ ├── basic.js │ │ │ │ │ │ ├── c.ts │ │ │ │ │ │ ├── circular │ │ │ │ │ │ │ ├── circular-a.js │ │ │ │ │ │ │ ├── circular-b.js │ │ │ │ │ │ │ └── circular-index.js │ │ │ │ │ │ ├── cjs-external-existing.js │ │ │ │ │ │ ├── cjs-external-non-existing.js │ │ │ │ │ │ ├── cjs-external │ │ │ │ │ │ │ ├── index.cjs │ │ │ │ │ │ │ └── package.json │ │ │ │ │ │ ├── cyclic │ │ │ │ │ │ │ ├── action.js │ │ │ │ │ │ │ ├── entry-cyclic.js │ │ │ │ │ │ │ └── entry.js │ │ │ │ │ │ ├── cyclic2 │ │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ │ ├── test1 │ │ │ │ │ │ │ │ ├── dep1.js │ │ │ │ │ │ │ │ ├── dep2.js │ │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ │ ├── test2 │ │ │ │ │ │ │ │ ├── dep1.js │ │ │ │ │ │ │ │ ├── dep2.js │ │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ │ ├── test3 │ │ │ │ │ │ │ │ ├── dep1.js │ │ │ │ │ │ │ │ ├── dep2.js │ │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ │ ├── test4 │ │ │ │ │ │ │ │ ├── dep1.js │ │ │ │ │ │ │ │ ├── dep2.js │ │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ │ ├── test5 │ │ │ │ │ │ │ │ ├── dep1.js │ │ │ │ │ │ │ │ ├── dep2.js │ │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ │ ├── test6 │ │ │ │ │ │ │ │ ├── dep1.js │ │ │ │ │ │ │ │ ├── dep2.js │ │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ │ ├── test7 │ │ │ │ │ │ │ │ ├── Ion.js │ │ │ │ │ │ │ │ ├── IonTypes.js │ │ │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ │ │ └── dom │ │ │ │ │ │ │ │ │ ├── Blob.js │ │ │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ │ └── test9 │ │ │ │ │ │ │ │ ├── dep.js │ │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ ├── d.ts │ │ │ │ │ │ ├── default-string.ts │ │ │ │ │ │ ├── dynamic-import.js │ │ │ │ │ │ ├── esm-external-existing.js │ │ │ │ │ │ ├── esm-external-non-existing.js │ │ │ │ │ │ ├── esm-external │ │ │ │ │ │ │ ├── index.mjs │ │ │ │ │ │ │ └── package.json │ │ │ │ │ │ ├── execution-order-re-export │ │ │ │ │ │ │ ├── dep1.js │ │ │ │ │ │ │ ├── dep2.js │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ ├── has-error-deep.ts │ │ │ │ │ │ ├── has-error-first-comment.ts │ │ │ │ │ │ ├── has-error-first.js │ │ │ │ │ │ ├── has-error.js │ │ │ │ │ │ ├── hmr.js │ │ │ │ │ │ ├── installed.js │ │ │ │ │ │ ├── live-binding │ │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ │ ├── test1 │ │ │ │ │ │ │ │ ├── dep.js │ │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ │ ├── test2 │ │ │ │ │ │ │ │ ├── dep.js │ │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ │ ├── test3 │ │ │ │ │ │ │ │ ├── dep.js │ │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ │ └── test4 │ │ │ │ │ │ │ │ ├── dep.js │ │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ ├── native.js │ │ │ │ │ │ ├── no-this │ │ │ │ │ │ │ ├── importee.js │ │ │ │ │ │ │ └── importer.js │ │ │ │ │ │ ├── simple.js │ │ │ │ │ │ ├── test.css │ │ │ │ │ │ ├── test.module.css │ │ │ │ │ │ ├── throws-error-method.ts │ │ │ │ │ │ ├── virtual.js │ │ │ │ │ │ ├── worker.invoke.mjs │ │ │ │ │ │ └── worker.mjs │ │ │ │ │ ├── package.json │ │ │ │ │ ├── server-hmr.spec.ts │ │ │ │ │ ├── server-no-hmr.spec.ts │ │ │ │ │ ├── server-runtime.spec.ts │ │ │ │ │ ├── server-source-maps.spec.ts │ │ │ │ │ ├── server-worker-runner.invoke.spec.ts │ │ │ │ │ ├── server-worker-runner.spec.ts │ │ │ │ │ └── utils.ts │ │ │ │ └── serverModuleRunner.ts │ │ │ ├── ssrManifestPlugin.ts │ │ │ ├── ssrModuleLoader.ts │ │ │ ├── ssrStacktrace.ts │ │ │ └── ssrTransform.ts │ │ ├── tsconfig.build.json │ │ ├── tsconfig.json │ │ ├── typeUtils.ts │ │ ├── utils.ts │ │ └── watch.ts │ ├── shared │ │ ├── constants.ts │ │ ├── hmr.ts │ │ ├── hmrHandler.ts │ │ ├── invokeMethods.ts │ │ ├── moduleRunnerTransport.ts │ │ ├── ssrTransform.ts │ │ ├── tsconfig.json │ │ └── utils.ts │ └── types │ │ ├── alias.d.ts │ │ ├── anymatch.d.ts │ │ ├── chokidar.d.ts │ │ ├── commonjs.d.ts │ │ ├── connect.d.ts │ │ ├── dynamicImportVars.d.ts │ │ ├── http-proxy.d.ts │ │ ├── package.json │ │ ├── shims.d.ts │ │ ├── terser.d.ts │ │ └── ws.d.ts │ ├── tsconfig.base.json │ ├── tsconfig.check.json │ ├── tsconfig.json │ └── types │ ├── customEvent.d.ts │ ├── hmrPayload.d.ts │ ├── hot.d.ts │ ├── import-meta.d.ts │ ├── importGlob.d.ts │ ├── importMeta.d.ts │ ├── internal │ ├── cssPreprocessorOptions.d.ts │ └── lightningcssOptions.d.ts │ ├── metadata.d.ts │ └── package.json ├── patches ├── chokidar@3.6.0.patch ├── dotenv-expand@12.0.2.patch ├── http-proxy@1.18.1.patch └── sirv@3.0.1.patch ├── playground ├── alias │ ├── __tests__ │ │ └── alias.spec.ts │ ├── customResolver.js │ ├── dir │ │ ├── from-script-src.js │ │ ├── module │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── test.css │ │ └── test.js │ ├── index.html │ ├── package.json │ ├── test.js │ └── vite.config.js ├── assets-sanitize │ ├── +circle.svg │ ├── .env │ ├── __tests__ │ │ └── assets-sanitize.spec.ts │ ├── _circle.svg │ ├── index.html │ ├── index.js │ ├── package.json │ └── vite.config.js ├── assets │ ├── __tests__ │ │ ├── assets.spec.ts │ │ ├── encoded-base │ │ │ └── assets-encoded-base.spec.ts │ │ ├── relative-base │ │ │ └── assets-relative-base.spec.ts │ │ ├── runtime-base │ │ │ └── assets-runtime-base.spec.ts │ │ └── url-base │ │ │ └── assets-url-base.spec.ts │ ├── asset │ │ ├── main.js │ │ ├── percent%.png │ │ └── style.css │ ├── css │ │ ├── css-url-url.css │ │ ├── css-url.css │ │ ├── fonts.css │ │ ├── foo.module.css │ │ ├── icons.css │ │ ├── import.css │ │ ├── manual-chunks.css │ │ └── nested │ │ │ └── at-imported-css-url.css │ ├── favicon.ico │ ├── fonts │ │ ├── Inter-Italic.woff │ │ └── Inter-Italic.woff2 │ ├── foo.js │ ├── index.html │ ├── manifest.json │ ├── nested │ │ ├── asset.png │ │ ├── asset[small].png │ │ ├── foo.unknown │ │ ├── fragment-bg-hmr.svg │ │ ├── fragment-bg-hmr2.svg │ │ ├── fragment-bg.svg │ │ ├── fragment.svg │ │ ├── html-only-asset.jpg │ │ ├── icon.png │ │ ├── inlined.svg │ │ ├── test.js │ │ ├── with-single'quote.png │ │ └── テスト-測試-white space.png │ ├── package.json │ ├── static │ │ ├── bar │ │ ├── foo.css │ │ ├── foo.json │ │ ├── foo.txt │ │ ├── icon.png │ │ ├── import-expression.js │ │ ├── raw.css │ │ ├── raw.js │ │ ├── raw.mts │ │ └── raw.ts │ ├── vite.config-encoded-base.js │ ├── vite.config-relative-base.js │ ├── vite.config-runtime-base.js │ ├── vite.config-url-base.js │ ├── vite.config.js │ └── テスト-測試-white space.js ├── backend-integration │ ├── __tests__ │ │ └── backend-integration.spec.ts │ ├── dir │ │ └── foo.css │ ├── frontend │ │ ├── entrypoints │ │ │ ├── foo.pcss │ │ │ ├── global.css │ │ │ ├── icon.png │ │ │ ├── index.html │ │ │ ├── main.ts │ │ │ ├── nested │ │ │ │ ├── blue.scss │ │ │ │ └── sub.ts │ │ │ └── water-container.svg │ │ ├── images │ │ │ └── logo.png │ │ └── styles │ │ │ ├── background.css │ │ │ ├── imported.css │ │ │ ├── tailwind.css │ │ │ └── url.css │ ├── package.json │ ├── references.css │ └── vite.config.js ├── build-old │ ├── __tests__ │ │ └── build-old.spec.ts │ ├── dynamic.js │ ├── index.html │ ├── package.json │ └── vite.config.js ├── cli-module │ ├── __tests__ │ │ ├── cli-module.spec.ts │ │ └── serve.ts │ ├── index.html │ ├── index.js │ ├── package.json │ └── vite.config.js ├── cli │ ├── __tests__ │ │ ├── cli.spec.ts │ │ └── serve.ts │ ├── index.html │ ├── index.js │ ├── package.json │ └── vite.config.js ├── client-reload │ ├── __tests__ │ │ ├── client-reload.spec.ts │ │ └── serve.ts │ ├── index.html │ ├── package.json │ └── vite.config.ts ├── csp │ ├── __tests__ │ │ └── csp.spec.ts │ ├── dynamic.css │ ├── dynamic.js │ ├── from-js.css │ ├── index.html │ ├── index.js │ ├── linked.css │ ├── package.json │ └── vite.config.js ├── css-codesplit-cjs │ ├── __tests__ │ │ └── css-codesplit-cjs.spec.ts │ ├── index.html │ ├── main.css │ ├── main.js │ ├── other.js │ ├── package.json │ ├── style.css │ └── vite.config.js ├── css-codesplit │ ├── __tests__ │ │ ├── css-codesplit-consistent.spec.ts │ │ └── css-codesplit.spec.ts │ ├── async-js.css │ ├── async-js.js │ ├── async.css │ ├── chunk.css │ ├── index.html │ ├── inline.css │ ├── main.css │ ├── main.js │ ├── mod.module.css │ ├── order │ │ ├── base.css │ │ ├── dynamic.css │ │ ├── index.js │ │ └── insert.js │ ├── other.js │ ├── package.json │ ├── shared-css-empty-1.js │ ├── shared-css-empty-2.js │ ├── shared-css-main.js │ ├── shared-css-no-js.html │ ├── shared-css-theme.css │ ├── shared-css-with-js.html │ ├── style.css │ ├── style2.css │ ├── style2.js │ └── vite.config.js ├── css-dynamic-import │ ├── __tests__ │ │ ├── css-dynamic-import.spec.ts │ │ └── serve.ts │ ├── dynamic.css │ ├── dynamic.js │ ├── index.html │ ├── index.js │ ├── package.json │ ├── static.css │ └── static.js ├── css-lightningcss-proxy │ ├── __tests__ │ │ ├── css-lightningcss-proxy.spec.ts │ │ └── serve.ts │ ├── index.html │ ├── package.json │ └── server.js ├── css-lightningcss-root │ ├── __tests__ │ │ └── css-lightningcss-root.spec.ts │ ├── package.json │ ├── root │ │ ├── index.html │ │ ├── main.js │ │ ├── ok.png │ │ └── url-dep.css │ └── vite.config.js ├── css-lightningcss │ ├── __tests__ │ │ └── css-lightningcss.spec.ts │ ├── composed.module.css │ ├── composes-path-resolving.module.css │ ├── css-url.css │ ├── external-url.css │ ├── imported-at-import.css │ ├── imported.css │ ├── index.html │ ├── inline.module.css │ ├── inlined.css │ ├── linked-at-import.css │ ├── linked.css │ ├── main.js │ ├── minify.css │ ├── mod.module.css │ ├── nested │ │ ├── fragment.svg │ │ └── nested.css │ ├── ok.png │ ├── package.json │ └── vite.config.js ├── css-no-codesplit │ ├── __tests__ │ │ └── css-no-codesplit.spec.ts │ ├── async-js.css │ ├── async-js.js │ ├── index.html │ ├── index.js │ ├── package.json │ ├── shared-linked.css │ ├── sub.html │ └── vite.config.js ├── css-sourcemap │ ├── __tests__ │ │ ├── css-sourcemap.spec.ts │ │ ├── lib-entry │ │ │ └── css-sourcemap-lib-entry.spec.ts │ │ └── lightningcss │ │ │ └── lightningcss.spec.ts │ ├── be-imported.css │ ├── imported-nested.sass │ ├── imported-with-import.css │ ├── imported.css │ ├── imported.less │ ├── imported.module.sass │ ├── imported.sass │ ├── imported.sss │ ├── imported.styl │ ├── index.html │ ├── index.js │ ├── input-map.css │ ├── input-map.css.map │ ├── input-map.src.css │ ├── linked-with-import.css │ ├── linked.css │ ├── package.json │ ├── vite.config-lib-entry.js │ ├── vite.config-lightningcss.js │ └── vite.config.js ├── css │ ├── __tests__ │ │ ├── css.spec.ts │ │ ├── lightningcss │ │ │ └── lightningcss.spec.ts │ │ ├── no-css-minify │ │ │ └── css-no-css-minify.spec.ts │ │ ├── postcss-plugins-different-dir │ │ │ ├── css-postcss-plugins-different-dir.spec.ts │ │ │ └── serve.ts │ │ ├── same-file-name │ │ │ └── css-same-file-name.spec.ts │ │ ├── sass-modern-compiler-build │ │ │ └── sass-modern-compiler.spec.ts │ │ ├── sass-tests.ts │ │ └── tests.ts │ ├── aliased │ │ ├── bar.module.css │ │ └── foo.css │ ├── async-treeshaken.css │ ├── async-treeshaken.js │ ├── async.css │ ├── async.js │ ├── async │ │ ├── async-1.css │ │ ├── async-1.js │ │ ├── async-2.css │ │ ├── async-2.js │ │ ├── async-3.js │ │ ├── async-3.module.css │ │ ├── base.css │ │ ├── base.js │ │ └── index.js │ ├── charset.css │ ├── composed.module.css │ ├── composed.module.less │ ├── composed.module.scss │ ├── composes-path-resolving.module.css │ ├── css-dep-exports │ │ ├── index.js │ │ ├── package.json │ │ ├── style.css │ │ └── style.scss │ ├── css-dep │ │ ├── index.css │ │ ├── index.js │ │ ├── index.scss │ │ ├── index.styl │ │ └── package.json │ ├── css-js-dep │ │ ├── bar.module.css │ │ ├── foo.css │ │ ├── index.js │ │ └── package.json │ ├── css-proxy-dep-nested │ │ ├── index.css │ │ └── package.json │ ├── css-proxy-dep │ │ ├── index.css │ │ └── package.json │ ├── dep.css │ ├── file-absolute.scss │ ├── folder with space │ │ ├── ok.png │ │ └── space.css │ ├── glob-dep.css │ ├── glob-dep │ │ ├── bar.css │ │ ├── foo.css │ │ └── nested (dir) │ │ │ └── baz.css │ ├── glob-import │ │ ├── bar.css │ │ └── foo.css │ ├── imported-at-import.css │ ├── imported.css │ ├── imported.scss │ ├── imports-field.css │ ├── imports-imports-field.css │ ├── index.html │ ├── inline.module.css │ ├── inlined.css │ ├── jsfile.css.js │ ├── layered │ │ ├── blue.css │ │ ├── green.css │ │ └── index.css │ ├── less-plugin.less │ ├── less-plugin │ │ └── test.js │ ├── less.less │ ├── less │ │ ├── components │ │ │ └── form.less │ │ ├── images │ │ │ └── backgrounds │ │ │ │ └── form-select.svg │ │ └── ommer.less │ ├── lightningcss-plugins.js │ ├── linked-at-import.css │ ├── linked.css │ ├── main.js │ ├── manual-chunk.css │ ├── minify.css │ ├── mod.module.css │ ├── mod.module.scss │ ├── nested │ │ ├── _index.scss │ │ ├── _partial.scss │ │ ├── css-in-less-2.less │ │ ├── css-in-less.css │ │ ├── css-in-less.less │ │ ├── css-in-scss.css │ │ ├── icon.png │ │ ├── nested.less │ │ ├── nested.sss │ │ ├── nested.styl │ │ ├── relative.scss │ │ └── root-relative.scss │ ├── ok.png │ ├── options │ │ ├── absolute-import.styl │ │ └── relative-import.styl │ ├── package.json │ ├── pkg-dep │ │ ├── _index.scss │ │ ├── index.js │ │ └── package.json │ ├── postcss-caching │ │ ├── blue-app │ │ │ ├── imported.css │ │ │ ├── index.html │ │ │ ├── main.js │ │ │ ├── package.json │ │ │ └── postcss.config.js │ │ ├── css.spec.ts │ │ ├── green-app │ │ │ ├── imported.css │ │ │ ├── index.html │ │ │ ├── main.js │ │ │ ├── package.json │ │ │ └── postcss.config.js │ │ └── serve.ts │ ├── postcss-inject-url.css │ ├── postcss-source-input.css │ ├── postcss.config.js │ ├── raw-imported.css │ ├── same-name │ │ ├── sub1 │ │ │ ├── sub.css │ │ │ └── sub.js │ │ └── sub2 │ │ │ ├── sub.css │ │ │ └── sub.js │ ├── sass-modern-compiler-build │ │ ├── entry1.scss │ │ └── entry2.scss │ ├── sass.scss │ ├── scss-dir │ │ ├── dir │ │ │ └── index.scss │ │ └── main.scss │ ├── scss-proxy-dep-nested │ │ ├── index.css │ │ └── package.json │ ├── scss-proxy-dep │ │ ├── index.scss │ │ └── package.json │ ├── stylus.styl │ ├── sugarss.sss │ ├── treeshake-module │ │ ├── a.js │ │ ├── a.module.css │ │ ├── b.js │ │ ├── b.module.css │ │ └── index.js │ ├── treeshake-scoped │ │ ├── a-scoped.css │ │ ├── a.js │ │ ├── b-scoped.css │ │ ├── b.js │ │ ├── c-scoped.css │ │ ├── c.js │ │ ├── d-scoped.css │ │ ├── d.js │ │ ├── index.html │ │ ├── index.js │ │ └── order │ │ │ ├── a-scoped.css │ │ │ ├── a.js │ │ │ ├── after.css │ │ │ └── before.css │ ├── unsupported.css │ ├── url-imported.css │ ├── vite.config-lightningcss.js │ ├── vite.config-no-css-minify.js │ ├── vite.config-relative-base.js │ ├── vite.config-same-file-name.js │ ├── vite.config-sass-modern-compiler-build.js │ ├── vite.config.js │ └── weapp.wxss ├── data-uri │ ├── __tests__ │ │ └── data-uri.spec.ts │ ├── double-quote-in-single-quotes.svg │ ├── double-quotes-in-single-quotes.svg │ ├── index.html │ ├── main.js │ ├── package.json │ ├── single-quote-in-double-quotes.svg │ ├── single-quotes-in-double-quotes.svg │ └── vite.config.js ├── define │ ├── __tests__ │ │ └── define.spec.ts │ ├── commonjs-dep │ │ ├── index.js │ │ └── package.json │ ├── data.json │ ├── index.html │ ├── package.json │ └── vite.config.js ├── dynamic-import-inline │ ├── __tests__ │ │ └── dynamic-import-inline.spec.ts │ ├── index.html │ ├── package.json │ ├── src │ │ ├── foo.js │ │ └── index.js │ └── vite.config.js ├── dynamic-import │ ├── (app) │ │ ├── main.js │ │ └── nest │ │ │ └── index.js │ ├── __tests__ │ │ └── dynamic-import.spec.ts │ ├── alias │ │ ├── hello.js │ │ ├── hi.js │ │ ├── url.js │ │ └── worker.js │ ├── css │ │ └── index.css │ ├── files │ │ ├── mxd.js │ │ └── mxd.json │ ├── index.html │ ├── nested │ │ ├── deps.js │ │ ├── hello.js │ │ ├── index.js │ │ ├── nested │ │ │ └── self.js │ │ ├── self.js │ │ ├── shared.js │ │ ├── static.js │ │ └── treeshaken │ │ │ ├── syntax.js │ │ │ └── treeshaken.js │ ├── package.json │ ├── pkg │ │ ├── index.js │ │ ├── package.json │ │ └── pkg.css │ ├── views │ │ ├── bar.js │ │ ├── baz.js │ │ ├── foo.js │ │ └── qux.js │ └── vite.config.js ├── env-nested │ ├── .env │ ├── __tests__ │ │ └── env-nested.spec.ts │ ├── envs │ │ ├── .env.development │ │ └── .env.production │ ├── index.html │ ├── package.json │ └── vite.config.js ├── env │ ├── .env │ ├── .env.development │ ├── .env.production │ ├── __tests__ │ │ └── env.spec.ts │ ├── index.html │ ├── index.js │ ├── package.json │ └── vite.config.js ├── environment-react-ssr │ ├── __tests__ │ │ └── environment-react-ssr.spec.ts │ ├── index.html │ ├── package.json │ ├── src │ │ ├── entry-client.tsx │ │ ├── entry-server.tsx │ │ └── root.tsx │ ├── tsconfig.json │ └── vite.config.ts ├── extensions │ ├── __tests__ │ │ └── extensions.spec.ts │ ├── index.html │ ├── package.json │ └── vite.config.js ├── external │ ├── __tests__ │ │ └── external.spec.ts │ ├── dep-that-imports │ │ ├── index.js │ │ └── package.json │ ├── dep-that-requires │ │ ├── index.js │ │ └── package.json │ ├── index.html │ ├── package.json │ ├── public │ │ └── slash@3.0.0.js │ ├── src │ │ └── main.js │ └── vite.config.js ├── fs-serve │ ├── __tests__ │ │ ├── base │ │ │ └── fs-serve-base.spec.ts │ │ ├── deny │ │ │ └── fs-serve-deny.spec.ts │ │ └── fs-serve.spec.ts │ ├── entry.js │ ├── nested │ │ └── foo.js │ ├── package.json │ ├── root │ │ ├── src │ │ │ ├── .env │ │ │ ├── code.js │ │ │ ├── deny │ │ │ │ ├── .deny │ │ │ │ └── deny.txt │ │ │ ├── dummy.crt │ │ │ ├── index.html │ │ │ ├── safe.txt │ │ │ ├── special characters åäö │ │ │ │ ├── safe.json │ │ │ │ └── safe.txt │ │ │ └── subdir │ │ │ │ └── safe.txt │ │ ├── unsafe.svg │ │ ├── unsafe.txt │ │ ├── vite.config-base.js │ │ ├── vite.config-deny.js │ │ └── vite.config.js │ ├── safe.json │ └── unsafe.json ├── glob-import │ ├── __tests__ │ │ └── glob-import.spec.ts │ ├── dir │ │ ├── alias.js │ │ ├── baz.json │ │ ├── foo.css │ │ ├── foo.js │ │ ├── index.js │ │ ├── nested │ │ │ └── bar.js │ │ ├── node_modules │ │ │ └── hoge.js │ │ └── quote'.js │ ├── escape │ │ ├── (parenthesis) │ │ │ ├── glob.js │ │ │ └── mod │ │ │ │ └── index.js │ │ ├── [brackets] │ │ │ ├── glob.js │ │ │ └── mod │ │ │ │ └── index.js │ │ └── {curlies} │ │ │ ├── glob.js │ │ │ └── mod │ │ │ └── index.js │ ├── import-meta-glob-pkg │ │ ├── index.js │ │ └── package.json │ ├── imports-path │ │ ├── bar.js │ │ └── foo.js │ ├── index.html │ ├── no-tree-shake.css │ ├── package.json │ ├── pkg-pages │ │ └── foo.js │ ├── side-effect │ │ ├── writedom.js │ │ └── writetodom.js │ ├── tree-shake.css │ └── vite.config.ts ├── hmr-root │ ├── __tests__ │ │ └── hmr-root.spec.ts │ ├── foo.js │ ├── root │ │ └── index.html │ └── vite.config.ts ├── hmr-ssr │ ├── __tests__ │ │ └── hmr-ssr.spec.ts │ ├── accept-exports │ │ ├── dynamic-imports │ │ │ ├── deps-all-accepted.ts │ │ │ ├── deps-some-accepted.ts │ │ │ ├── dynamic-imports.ts │ │ │ └── index.ts │ │ ├── export-from │ │ │ ├── depA.ts │ │ │ ├── export-from.ts │ │ │ ├── hub.ts │ │ │ └── index.html │ │ ├── main-accepted │ │ │ ├── callback.ts │ │ │ ├── dep.ts │ │ │ ├── index.ts │ │ │ ├── main-accepted.ts │ │ │ └── target.ts │ │ ├── main-non-accepted │ │ │ ├── default.ts │ │ │ ├── dep.ts │ │ │ ├── index.ts │ │ │ ├── main-non-accepted.ts │ │ │ └── named.ts │ │ ├── reexports.bak │ │ │ ├── accept-named.ts │ │ │ ├── index.html │ │ │ ├── reexports.ts │ │ │ └── source.ts │ │ ├── side-effects │ │ │ ├── index.ts │ │ │ └── side-effects.ts │ │ ├── star-imports │ │ │ ├── deps-all-accepted.ts │ │ │ ├── deps-some-accepted.ts │ │ │ ├── index.ts │ │ │ └── star-imports.ts │ │ └── unused-exports │ │ │ ├── index.html │ │ │ ├── index.ts │ │ │ ├── unused.ts │ │ │ └── used.ts │ ├── circular │ │ ├── index.js │ │ ├── mod-a.js │ │ ├── mod-b.js │ │ └── mod-c.js │ ├── counter │ │ ├── dep.ts │ │ └── index.ts │ ├── customFile.js │ ├── event.d.ts │ ├── file-delete-restore │ │ ├── child.js │ │ ├── index.js │ │ ├── parent.js │ │ └── runtime.js │ ├── hmr.ts │ ├── hmrDep.js │ ├── hmrNestedDep.js │ ├── importedVirtual.js │ ├── importing-updated │ │ ├── a.js │ │ ├── b.js │ │ └── index.js │ ├── intermediate-file-delete │ │ ├── display.js │ │ ├── index.js │ │ └── re-export.js │ ├── invalidation-circular-deps │ │ ├── circular-invalidate │ │ │ ├── child.js │ │ │ └── parent.js │ │ ├── index.js │ │ └── invalidate-handled-in-circle │ │ │ ├── child.js │ │ │ └── parent.js │ ├── invalidation │ │ ├── child.js │ │ └── parent.js │ ├── logo-no-inline.svg │ ├── logo.svg │ ├── missing-import │ │ ├── a.js │ │ ├── index.js │ │ └── main.js │ ├── modules.d.ts │ ├── non-tested │ │ ├── dep.js │ │ └── index.js │ ├── optional-chaining │ │ ├── child.js │ │ └── parent.js │ ├── package.json │ ├── queries │ │ ├── index.js │ │ └── multi-query.js │ ├── self-accept-within-circular │ │ ├── a.js │ │ ├── b.js │ │ ├── c.js │ │ └── index.js │ ├── soft-invalidation │ │ ├── child.js │ │ └── index.js │ ├── unresolved.ts │ └── vite.config.ts ├── hmr │ ├── __tests__ │ │ └── hmr.spec.ts │ ├── accept-exports │ │ ├── dynamic-imports │ │ │ ├── deps-all-accepted.ts │ │ │ ├── deps-some-accepted.ts │ │ │ ├── dynamic-imports.ts │ │ │ └── index.html │ │ ├── export-from │ │ │ ├── depA.ts │ │ │ ├── export-from.ts │ │ │ ├── hub.ts │ │ │ └── index.html │ │ ├── main-accepted │ │ │ ├── callback.ts │ │ │ ├── dep.ts │ │ │ ├── index.html │ │ │ ├── main-accepted.ts │ │ │ └── target.ts │ │ ├── main-non-accepted │ │ │ ├── default.ts │ │ │ ├── dep.ts │ │ │ ├── index.html │ │ │ ├── main-non-accepted.ts │ │ │ └── named.ts │ │ ├── reexports.bak │ │ │ ├── accept-named.ts │ │ │ ├── index.html │ │ │ ├── reexports.ts │ │ │ └── source.ts │ │ ├── side-effects │ │ │ ├── index.html │ │ │ └── side-effects.ts │ │ ├── star-imports │ │ │ ├── deps-all-accepted.ts │ │ │ ├── deps-some-accepted.ts │ │ │ ├── index.html │ │ │ └── star-imports.ts │ │ └── unused-exports │ │ │ ├── index.html │ │ │ ├── index.ts │ │ │ ├── unused.ts │ │ │ └── used.ts │ ├── circular │ │ ├── index.js │ │ ├── mod-a.js │ │ ├── mod-b.js │ │ └── mod-c.js │ ├── counter │ │ ├── dep.ts │ │ ├── index.html │ │ └── index.ts │ ├── css-deps │ │ ├── dep.js │ │ ├── index.html │ │ └── main.css │ ├── customFile.js │ ├── event.d.ts │ ├── file-delete-restore │ │ ├── child.js │ │ ├── index.js │ │ ├── parent.js │ │ └── runtime.js │ ├── global.css │ ├── hmr.ts │ ├── hmrDep.js │ ├── hmrNestedDep.js │ ├── icon.png │ ├── importedVirtual.js │ ├── importing-updated │ │ ├── a.js │ │ ├── b.js │ │ └── index.js │ ├── index.html │ ├── intermediate-file-delete │ │ ├── display.js │ │ ├── index.js │ │ └── re-export.js │ ├── invalidation-circular-deps │ │ ├── circular-invalidate │ │ │ ├── child.js │ │ │ └── parent.js │ │ ├── index.js │ │ └── invalidate-handled-in-circle │ │ │ ├── child.js │ │ │ └── parent.js │ ├── invalidation │ │ ├── child.js │ │ ├── parent.js │ │ └── root.js │ ├── logo-no-inline.svg │ ├── logo.svg │ ├── missing-file │ │ ├── index.html │ │ └── main.js │ ├── missing-import │ │ ├── a.js │ │ ├── index.html │ │ └── main.js │ ├── modules.d.ts │ ├── optional-chaining │ │ ├── child.js │ │ └── parent.js │ ├── package.json │ ├── self-accept-within-circular │ │ ├── a.js │ │ ├── b.js │ │ ├── c.js │ │ ├── index.html │ │ └── index.js │ ├── soft-invalidation │ │ ├── child.js │ │ └── index.js │ ├── unicode-path │ │ └── 中文-にほんご-한글-🌕🌖🌗 │ │ │ └── index.html │ └── vite.config.ts ├── html │ ├── .env │ ├── __tests__ │ │ └── html.spec.ts │ ├── a á.html │ ├── common.css │ ├── emptyAttr.html │ ├── env.html │ ├── foo.html │ ├── importmapOrder.html │ ├── index.html │ ├── inline │ │ ├── common.js │ │ ├── dep1.js │ │ ├── dep2.js │ │ ├── dep3.js │ │ ├── module-graph.dot │ │ ├── shared-1.html │ │ ├── shared-2.html │ │ ├── shared.js │ │ ├── shared_a.html │ │ ├── unique.html │ │ └── unique.js │ ├── invalid.html │ ├── link-props │ │ ├── index.html │ │ ├── print.css │ │ └── screen.css │ ├── link.html │ ├── main.css │ ├── main.js │ ├── nested │ │ ├── asset │ │ │ ├── main.js │ │ │ └── style.css │ │ ├── index.html │ │ ├── nested.css │ │ └── nested.js │ ├── noBody.html │ ├── noHead.html │ ├── package.json │ ├── public │ │ └── sprite.svg │ ├── relative-input.html │ ├── relative-input │ │ └── main.js │ ├── scriptAsync.html │ ├── scriptMixed.html │ ├── serve │ │ ├── both.html │ │ ├── both │ │ │ └── index.html │ │ ├── file.html │ │ └── folder │ │ │ └── index.html │ ├── shared.js │ ├── side-effects │ │ ├── index.html │ │ ├── package.json │ │ └── sideEffects.js │ ├── transform-inline-js.html │ ├── unicode-path │ │ └── 中文-にほんご-한글-🌕🌖🌗 │ │ │ └── index.html │ ├── valid.html │ ├── valid.js │ ├── vite.config.js │ ├── warmup │ │ └── warm.js │ ├── write.html │ └── zeroJS.html ├── import-assertion │ ├── __tests__ │ │ └── import-assertion.spec.ts │ ├── data.json │ ├── import-assertion-dep │ │ ├── data.json │ │ ├── index.js │ │ └── package.json │ ├── index.html │ └── package.json ├── js-sourcemap │ ├── __tests__ │ │ └── js-sourcemap.spec.ts │ ├── after-preload-dynamic-hashbang.js │ ├── after-preload-dynamic-no-dep.js │ ├── after-preload-dynamic.js │ ├── bar.ts │ ├── dynamic │ │ ├── dynamic-foo.css │ │ ├── dynamic-foo.js │ │ └── dynamic-no-dep.js │ ├── foo-with-sourcemap-plugin.ts │ ├── foo-with-sourcemap.js │ ├── foo.js │ ├── importee-pkg │ │ ├── index.js │ │ └── package.json │ ├── index.html │ ├── package.json │ ├── plugin-foo.js │ ├── test-ssr-dev.js │ ├── vite.config.js │ ├── with-define-object-ssr.ts │ ├── with-define-object.ts │ ├── with-multiline-import.ts │ ├── zoo-with-sourcemap-plugin.ts │ └── zoo.js ├── json │ ├── __tests__ │ │ └── csr │ │ │ └── json-csr.spec.ts │ ├── hmr.json │ ├── index.html │ ├── json-bom │ │ └── has-bom.json │ ├── json-module │ │ ├── index.json │ │ └── package.json │ ├── package.json │ ├── public │ │ └── public.json │ └── test.json ├── legacy │ ├── __tests__ │ │ ├── client-and-ssr │ │ │ ├── legacy-client-legacy-ssr-sequential-builds.spec.ts │ │ │ └── serve.ts │ │ ├── legacy.spec.ts │ │ ├── no-polyfills-no-systemjs │ │ │ └── legacy-no-polyfills-no-systemjs.spec.ts │ │ ├── no-polyfills │ │ │ └── legacy-no-polyfills.spec.ts │ │ ├── ssr │ │ │ ├── legacy-ssr.spec.ts │ │ │ └── serve.ts │ │ └── watch │ │ │ └── legacy-styles-only-entry-watch.spec.ts │ ├── async.js │ ├── custom0.js │ ├── custom1.js │ ├── custom2.js │ ├── dynamic.css │ ├── entry-server-sequential.js │ ├── entry-server.js │ ├── immutable-chunk.js │ ├── index.html │ ├── main.js │ ├── module.js │ ├── nested │ │ └── index.html │ ├── no-polyfills-no-systemjs.html │ ├── no-polyfills-no-systemjs.js │ ├── no-polyfills.html │ ├── no-polyfills.js │ ├── package.json │ ├── style-only-entry.css │ ├── style.css │ ├── vite.config-custom-filename.js │ ├── vite.config-multiple-output.js │ ├── vite.config-no-polyfills-no-systemjs.js │ ├── vite.config-no-polyfills.js │ ├── vite.config-watch.js │ ├── vite.config.js │ ├── vite.svg │ └── worker.js ├── lib │ ├── __tests__ │ │ ├── lib.spec.ts │ │ └── serve.ts │ ├── index.dist.html │ ├── index.html │ ├── package.json │ ├── src │ │ ├── css-entry-1.js │ │ ├── css-entry-2.js │ │ ├── dynamic.css │ │ ├── entry-1.css │ │ ├── entry-2.css │ │ ├── index.css │ │ ├── main-helpers-injection.js │ │ ├── main-multiple-output.js │ │ ├── main-named.js │ │ ├── main.js │ │ ├── main2.js │ │ ├── message.js │ │ └── sub-multiple-output.js │ ├── vite.config.js │ ├── vite.css-code-split.config.js │ ├── vite.css-multi-entry.config.js │ ├── vite.css-single-entry.config.js │ ├── vite.dyimport.config.js │ ├── vite.helpers-injection.config.js │ ├── vite.multiple-output.config.js │ ├── vite.named-exports.config.js │ └── vite.nominify.config.js ├── minify │ ├── __tests__ │ │ └── minify.spec.ts │ ├── dir │ │ └── module │ │ │ ├── index.css │ │ │ ├── index.js │ │ │ └── package.json │ ├── index.html │ ├── main.js │ ├── package.json │ ├── test.css │ └── vite.config.js ├── module-graph │ ├── __tests__ │ │ └── module-graph.spec.ts │ ├── empty.js │ ├── imported-urls-order.js │ ├── index.html │ ├── package.json │ └── vite.config.ts ├── multiple-entrypoints │ ├── __tests__ │ │ └── multiple-entrypoints.spec.ts │ ├── deps.json │ ├── dynamic-a.js │ ├── dynamic-b.js │ ├── entrypoints │ │ ├── a0.js │ │ ├── a1.js │ │ ├── a10.js │ │ ├── a11.js │ │ ├── a12.js │ │ ├── a13.js │ │ ├── a14.js │ │ ├── a15.js │ │ ├── a16.js │ │ ├── a17.js │ │ ├── a18.js │ │ ├── a19.js │ │ ├── a2.js │ │ ├── a20.js │ │ ├── a21.js │ │ ├── a22.js │ │ ├── a23.js │ │ ├── a24.js │ │ ├── a3.js │ │ ├── a4.js │ │ ├── a5.js │ │ ├── a6.js │ │ ├── a7.js │ │ ├── a8.js │ │ └── a9.js │ ├── index.html │ ├── index.js │ ├── package.json │ ├── reference.js │ ├── reference.scss │ └── vite.config.js ├── nested-deps │ ├── __tests__ │ │ └── nested-deps.spec.ts │ ├── index.html │ ├── package.json │ ├── test-package-a │ │ ├── index.js │ │ └── package.json │ ├── test-package-b │ │ ├── index.js │ │ ├── node_modules │ │ │ └── test-package-a │ │ │ │ ├── index.js │ │ │ │ └── package.json │ │ └── package.json │ ├── test-package-c │ │ ├── index-es.js │ │ ├── index.js │ │ ├── package.json │ │ └── side.js │ ├── test-package-d │ │ ├── index.js │ │ ├── package.json │ │ └── test-package-d-nested │ │ │ ├── index.js │ │ │ └── package.json │ ├── test-package-e │ │ ├── index.js │ │ ├── package.json │ │ ├── test-package-e-excluded │ │ │ ├── index.js │ │ │ └── package.json │ │ └── test-package-e-included │ │ │ ├── index.js │ │ │ └── package.json │ ├── test-package-f │ │ ├── index.js │ │ └── package.json │ └── vite.config.js ├── object-hooks │ ├── __tests__ │ │ └── object-hooks.spec.ts │ ├── index.html │ ├── main.ts │ ├── package.json │ └── vite.config.ts ├── optimize-deps-no-discovery │ ├── __tests__ │ │ └── optimize-deps-no-discovery.spec.ts │ ├── dep-no-discovery │ │ ├── index.js │ │ └── package.json │ ├── index.html │ ├── package.json │ └── vite.config.js ├── optimize-deps │ ├── .hidden-dir │ │ └── foo.js │ ├── __tests__ │ │ └── optimize-deps.spec.ts │ ├── added-in-entries │ │ ├── index.js │ │ └── package.json │ ├── cjs-dynamic.js │ ├── cjs.js │ ├── dedupe.js │ ├── dep-alias-using-absolute-path │ │ ├── index.js │ │ └── package.json │ ├── dep-cjs-browser-field-bare │ │ ├── events-shim.js │ │ ├── index.js │ │ ├── internal.js │ │ └── package.json │ ├── dep-cjs-compiled-from-cjs │ │ ├── index.js │ │ └── package.json │ ├── dep-cjs-compiled-from-esm │ │ ├── index.js │ │ └── package.json │ ├── dep-cjs-external-package-omit-js-suffix │ │ ├── index.js │ │ ├── package.json │ │ ├── test.astro.js │ │ ├── test.okay.js │ │ ├── test.scss.js │ │ └── test.tsx.js │ ├── dep-cjs-with-assets │ │ ├── foo.css │ │ ├── index.js │ │ └── package.json │ ├── dep-cjs-with-external-deps │ │ ├── index.js │ │ └── package.json │ ├── dep-css-require │ │ ├── index.cjs │ │ ├── mod.cjs │ │ ├── mod.module.css │ │ ├── package.json │ │ └── style.css │ ├── dep-esbuild-plugin-transform │ │ ├── index.js │ │ └── package.json │ ├── dep-esm-dummy-node-builtin │ │ ├── index.js │ │ └── package.json │ ├── dep-esm-external │ │ ├── index.js │ │ └── package.json │ ├── dep-incompatible │ │ ├── index.js │ │ ├── package.json │ │ └── sub.js │ ├── dep-linked-include │ │ ├── Test.vue │ │ ├── foo.js │ │ ├── index.mjs │ │ ├── package.json │ │ └── test.css │ ├── dep-linked │ │ ├── index.js │ │ └── package.json │ ├── dep-node-env │ │ ├── index.js │ │ └── package.json │ ├── dep-non-optimized │ │ ├── index.js │ │ └── package.json │ ├── dep-not-js │ │ ├── foo.js │ │ ├── index.notjs │ │ └── package.json │ ├── dep-optimize-exports-with-glob │ │ ├── glob │ │ │ ├── bar.js │ │ │ ├── foo.js │ │ │ └── nested │ │ │ │ └── baz.js │ │ ├── index.js │ │ ├── named.js │ │ └── package.json │ ├── dep-optimize-exports-with-root-glob │ │ ├── dir │ │ │ └── file2.js │ │ ├── file1.js │ │ ├── index.js │ │ └── package.json │ ├── dep-optimize-with-glob │ │ ├── glob │ │ │ ├── bar.js │ │ │ ├── foo.js │ │ │ └── nested │ │ │ │ └── baz.js │ │ ├── index.js │ │ ├── named.js │ │ └── package.json │ ├── dep-relative-to-main │ │ ├── entry.js │ │ ├── lib │ │ │ └── main.js │ │ └── package.json │ ├── dep-source-map-no-sources │ │ ├── all.js │ │ ├── package.json │ │ └── sub.js │ ├── dep-with-asset-ext │ │ ├── dep1 │ │ │ ├── index.mjs │ │ │ └── package.json │ │ └── dep2 │ │ │ ├── index.js │ │ │ └── package.json │ ├── dep-with-builtin-module-cjs │ │ ├── index.js │ │ └── package.json │ ├── dep-with-builtin-module-esm │ │ ├── index.js │ │ └── package.json │ ├── dep-with-dynamic-import │ │ ├── dynamic.js │ │ ├── index.js │ │ └── package.json │ ├── dep-with-optional-peer-dep-cjs │ │ ├── index.js │ │ └── package.json │ ├── dep-with-optional-peer-dep-submodule │ │ ├── index.js │ │ └── package.json │ ├── dep-with-optional-peer-dep │ │ ├── index.js │ │ └── package.json │ ├── dynamic-use-dep-alias-using-absolute-path.js │ ├── generics.vue │ ├── glob │ │ └── foo.js │ ├── index.astro │ ├── index.html │ ├── long-file-name.js │ ├── longfilename │ │ ├── index.js │ │ └── package.json │ ├── nested-exclude │ │ ├── index.js │ │ └── package.json │ ├── nested-include │ │ ├── index.js │ │ └── package.json │ ├── non-optimizable-include │ │ ├── index.css │ │ └── package.json │ ├── package.json │ ├── unused-split-entry.js │ └── vite.config.js ├── optimize-missing-deps │ ├── __test__ │ │ ├── optimize-missing-deps.spec.ts │ │ └── serve.ts │ ├── index.html │ ├── main.js │ ├── missing-dep │ │ ├── index.js │ │ └── package.json │ ├── multi-entry-dep │ │ ├── index.browser.js │ │ ├── index.js │ │ └── package.json │ ├── package.json │ └── server.js ├── package.json ├── preload │ ├── __tests__ │ │ ├── preload-disabled │ │ │ └── preload-disabled.spec.ts │ │ ├── preload.spec.ts │ │ └── resolve-deps │ │ │ └── preload-resolve-deps.spec.ts │ ├── dep-a │ │ ├── index.js │ │ └── package.json │ ├── dep-including-a │ │ ├── index.js │ │ └── package.json │ ├── index.html │ ├── package.json │ ├── public │ │ └── preloaded.js │ ├── src │ │ ├── about.js │ │ ├── chunk.js │ │ ├── hello.js │ │ ├── hello.module.css │ │ └── main.js │ ├── vite.config-preload-disabled.js │ ├── vite.config-resolve-deps.js │ └── vite.config.ts ├── preserve-symlinks │ ├── __tests__ │ │ └── preserve-symlinks.spec.ts │ ├── index.html │ ├── module-a │ │ ├── linked.js │ │ ├── package.json │ │ └── src │ │ │ ├── data.js │ │ │ └── index.js │ ├── package.json │ └── src │ │ └── main.js ├── proxy-bypass │ ├── __tests__ │ │ └── proxy-bypass.spec.ts │ ├── index.html │ ├── package.json │ └── vite.config.js ├── proxy-hmr │ ├── __tests__ │ │ ├── proxy-hmr.spec.ts │ │ └── serve.ts │ ├── index.html │ ├── other-app │ │ ├── index.html │ │ ├── package.json │ │ └── vite.config.js │ ├── package.json │ └── vite.config.js ├── resolve-linked │ ├── dep.js │ ├── package.json │ └── src │ │ └── index.js ├── resolve │ ├── __tests__ │ │ ├── mainfields-custom-first │ │ │ └── resolve-mainfields-custom-first.spec.ts │ │ └── resolve.spec.ts │ ├── absolute.js │ ├── browser-field-bare-import-fail │ │ ├── main.js │ │ ├── module.js │ │ └── package.json │ ├── browser-field-bare-import-success │ │ ├── main.js │ │ ├── module.js │ │ └── package.json │ ├── browser-field │ │ ├── bare-import.js │ │ ├── multiple.dot.path.js │ │ ├── no-ext-index │ │ │ └── index.js │ │ ├── no-ext.js │ │ ├── not-browser.js │ │ ├── out │ │ │ ├── cjs.node.js │ │ │ └── esm.browser.js │ │ ├── package.json │ │ └── relative.js │ ├── browser-module-field1 │ │ ├── index.js │ │ ├── index.web.js │ │ └── package.json │ ├── browser-module-field2 │ │ ├── index.js │ │ ├── index.web.js │ │ └── package.json │ ├── browser-module-field3 │ │ ├── index.js │ │ ├── index.web.js │ │ └── package.json │ ├── config-dep.cjs │ ├── custom-browser-main-field │ │ ├── index.browser.js │ │ ├── index.custom.js │ │ ├── index.js │ │ └── package.json │ ├── custom-condition │ │ ├── index.custom.js │ │ ├── index.js │ │ └── package.json │ ├── custom-ext.es │ ├── custom-main-field │ │ ├── index.custom.js │ │ ├── index.js │ │ └── package.json │ ├── dir-with-ext.js │ │ └── empty │ ├── dir-with-ext │ │ └── index.js │ ├── dir.js │ ├── dir │ │ └── index.js │ ├── drive-relative.js │ ├── exact-extension │ │ ├── file.js │ │ ├── file.js.js │ │ └── file.json.js │ ├── exports-and-nested-scope │ │ ├── index.js │ │ ├── nested-scope │ │ │ ├── file.js │ │ │ └── package.json │ │ └── package.json │ ├── exports-env │ │ ├── browser.js │ │ ├── browser.mjs │ │ ├── browser.prod.mjs │ │ ├── fallback.umd.js │ │ └── package.json │ ├── exports-from-root │ │ ├── file.js │ │ ├── index.js │ │ ├── nested │ │ │ ├── file.js │ │ │ └── package.json │ │ └── package.json │ ├── exports-legacy-fallback │ │ ├── dir │ │ │ ├── index.js │ │ │ ├── index.mjs │ │ │ └── package.json │ │ ├── index.js │ │ └── package.json │ ├── exports-path │ │ ├── cjs.js │ │ ├── deep.js │ │ ├── deep.json │ │ ├── dir │ │ │ └── dir.js │ │ ├── main.js │ │ └── package.json │ ├── exports-with-module-condition-required │ │ ├── index.cjs │ │ └── package.json │ ├── exports-with-module-condition │ │ ├── index.esm.js │ │ ├── index.js │ │ ├── index.mjs │ │ └── package.json │ ├── exports-with-module │ │ ├── import.mjs │ │ ├── module.mjs │ │ └── package.json │ ├── file-url.js │ ├── imports-path │ │ ├── nested-path.js │ │ ├── other-pkg │ │ │ ├── nest │ │ │ │ └── index.js │ │ │ └── package.json │ │ ├── query.json │ │ ├── same-level.js │ │ ├── slash │ │ │ └── index.js │ │ ├── star │ │ │ └── index.js │ │ └── top-level.js │ ├── index.html │ ├── inline-package │ │ ├── inline.js │ │ └── package.json │ ├── non-normalized.js │ ├── package.json │ ├── public │ │ └── should-not-be-copied │ ├── require-pkg-with-module-field │ │ ├── dep.cjs │ │ ├── index.cjs │ │ └── package.json │ ├── sharp-dir │ │ ├── index.cjs │ │ └── package.json │ ├── ts-extension │ │ ├── hello.ts │ │ ├── hellocjs.cts │ │ ├── hellojsx.tsx │ │ ├── hellomjs.mts │ │ ├── hellotsx.tsx │ │ ├── index-js.js │ │ └── index.ts │ ├── utf8-bom-package │ │ ├── index.mjs │ │ └── package.json │ ├── utf8-bom │ │ └── main.js │ ├── util │ │ ├── bar.util.js │ │ └── index.js │ ├── vite.config-mainfields-custom-first.js │ └── vite.config.js ├── self-referencing │ ├── index.js │ ├── package.json │ └── test │ │ └── index.js ├── shims.d.ts ├── ssr-alias │ ├── __tests__ │ │ └── ssr-alias.spec.ts │ ├── alias-original │ │ ├── index.js │ │ └── package.json │ ├── package.json │ ├── src │ │ ├── alias-process.js │ │ ├── alias-replaced.js │ │ └── main.js │ └── vite.config.js ├── ssr-conditions │ ├── __tests__ │ │ ├── serve.ts │ │ └── ssr-conditions.spec.ts │ ├── external │ │ ├── browser.js │ │ ├── default.js │ │ ├── edge.js │ │ ├── node.js │ │ ├── node.unbundled.js │ │ └── package.json │ ├── index.html │ ├── no-external │ │ ├── browser.js │ │ ├── default.js │ │ ├── edge.js │ │ ├── node.js │ │ ├── node.unbundled.js │ │ └── package.json │ ├── package.json │ ├── server.js │ ├── src │ │ └── app.js │ └── vite.config.js ├── ssr-deps │ ├── __tests__ │ │ ├── serve.ts │ │ └── ssr-deps.spec.ts │ ├── css-lib │ │ ├── index.css │ │ └── package.json │ ├── define-properties-exports │ │ ├── index.js │ │ └── package.json │ ├── define-property-exports │ │ ├── index.js │ │ └── package.json │ ├── external-entry │ │ ├── entry.js │ │ ├── index.js │ │ └── package.json │ ├── external-using-external-entry │ │ ├── index.js │ │ └── package.json │ ├── forwarded-export │ │ ├── index.js │ │ └── package.json │ ├── import-builtin-cjs │ │ ├── index.js │ │ └── package.json │ ├── index.html │ ├── linked-no-external │ │ ├── index.js │ │ └── package.json │ ├── message │ ├── module-condition │ │ ├── import.mjs │ │ ├── module.js │ │ └── package.json │ ├── nested-exclude │ │ ├── index.js │ │ └── package.json │ ├── nested-external-cjs │ │ ├── index.js │ │ └── package.json │ ├── nested-external │ │ ├── index.js │ │ └── package.json │ ├── nested-include │ │ ├── index.js │ │ └── package.json │ ├── no-external-cjs │ │ ├── index.js │ │ └── package.json │ ├── no-external-css │ │ ├── index.css │ │ └── package.json │ ├── non-optimized-with-nested-external │ │ ├── index.js │ │ └── package.json │ ├── object-assigned-exports │ │ ├── index.js │ │ └── package.json │ ├── only-object-assigned-exports │ │ ├── index.js │ │ └── package.json │ ├── optimized-cjs-with-nested-external │ │ ├── index.js │ │ └── package.json │ ├── optimized-with-nested-external │ │ ├── index.js │ │ └── package.json │ ├── package.json │ ├── pkg-exports │ │ ├── index.js │ │ └── package.json │ ├── primitive-export │ │ ├── index.js │ │ └── package.json │ ├── read-file-content │ │ ├── index.js │ │ └── package.json │ ├── require-absolute │ │ ├── foo.js │ │ ├── index.js │ │ └── package.json │ ├── server.js │ ├── src │ │ ├── app.js │ │ ├── isomorphic-module-browser.js │ │ └── isomorphic-module-server.js │ └── ts-transpiled-exports │ │ ├── index.js │ │ └── package.json ├── ssr-html │ ├── __tests__ │ │ ├── serve.ts │ │ └── ssr-html.spec.ts │ ├── index.html │ ├── package.json │ ├── public │ │ └── slash@3.0.0.js │ ├── server.js │ ├── src │ │ ├── app.js │ │ ├── error-js.js │ │ ├── error-ts.ts │ │ ├── has-error-deep.ts │ │ ├── importedVirtual.js │ │ └── network-imports.js │ ├── test-network-imports.js │ ├── test-stacktrace-runtime.js │ └── test-stacktrace.js ├── ssr-noexternal │ ├── __tests__ │ │ ├── serve.ts │ │ └── ssr-noexternal.spec.ts │ ├── external-cjs │ │ ├── import.mjs │ │ ├── package.json │ │ └── require.cjs │ ├── index.html │ ├── package.json │ ├── require-external-cjs │ │ ├── main.js │ │ └── package.json │ ├── server.js │ ├── src │ │ └── entry-server.js │ └── vite.config.js ├── ssr-pug │ ├── __tests__ │ │ ├── serve.ts │ │ └── ssr-pug.spec.ts │ ├── index.pug │ ├── package.json │ ├── server.js │ └── src │ │ └── app.js ├── ssr-resolve │ ├── __tests__ │ │ └── ssr-resolve.spec.ts │ ├── deep-import │ │ ├── bar │ │ │ └── package.json │ │ ├── foo │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── index.js │ │ ├── package.json │ │ └── utils │ │ │ └── bar.js │ ├── entries │ │ ├── dir │ │ │ └── index.js │ │ ├── file.js │ │ └── package.json │ ├── main.js │ ├── package.json │ ├── pkg-exports │ │ ├── entry.js │ │ ├── index.js │ │ └── package.json │ ├── util.js │ └── vite.config.js ├── ssr-webworker │ ├── __tests__ │ │ ├── serve.ts │ │ └── ssr-webworker.spec.ts │ ├── browser-exports │ │ ├── browser.js │ │ ├── node.js │ │ └── package.json │ ├── package.json │ ├── src │ │ ├── dynamic.js │ │ └── entry-worker.jsx │ ├── vite.config.js │ ├── worker-exports │ │ ├── browser.js │ │ ├── node.js │ │ ├── package.json │ │ └── worker.js │ └── worker.js ├── ssr │ ├── __tests__ │ │ ├── serve.ts │ │ └── ssr.spec.ts │ ├── index.html │ ├── package.json │ ├── server.js │ ├── src │ │ ├── app.js │ │ ├── circular-dep-init │ │ │ ├── README.md │ │ │ ├── circular-dep-init.js │ │ │ ├── module-a.js │ │ │ └── module-b.js │ │ ├── circular-import │ │ │ ├── a.js │ │ │ ├── b.js │ │ │ └── index.js │ │ ├── circular-import2 │ │ │ ├── a.js │ │ │ ├── b.js │ │ │ └── index.js │ │ ├── forked-deadlock │ │ │ ├── README.md │ │ │ ├── common-module.js │ │ │ ├── deadlock-fuse-module.js │ │ │ ├── dynamic-imports │ │ │ │ ├── common-module.js │ │ │ │ ├── deadlock-fuse-module.js │ │ │ │ ├── fuse-stuck-bridge-module.js │ │ │ │ ├── middle-module.js │ │ │ │ └── stuck-module.js │ │ │ ├── fuse-stuck-bridge-module.js │ │ │ ├── middle-module.js │ │ │ └── stuck-module.js │ │ └── utils.js │ └── vite.config.ts ├── tailwind-sourcemap │ ├── __tests__ │ │ └── tailwind-sourcemap.spec.ts │ ├── index.html │ ├── package.json │ ├── postcss.config.js │ ├── tailwind.css │ └── vite.config.js ├── tailwind-v3 │ ├── __test__ │ │ └── tailwind-v3.spec.ts │ ├── index.css │ ├── index.html │ ├── package.json │ ├── postcss.config.js │ ├── src │ │ ├── components │ │ │ └── component1.js │ │ ├── main.js │ │ └── views │ │ │ └── view1.js │ ├── tailwind.config.ts │ └── vite.config.ts ├── tailwind │ ├── __test__ │ │ └── tailwind.spec.ts │ ├── index.css │ ├── index.html │ ├── package.json │ ├── public │ │ └── favicon.ico │ ├── src │ │ ├── components │ │ │ └── component1.js │ │ ├── main.js │ │ └── views │ │ │ └── view1.js │ ├── tailwind.config.ts │ └── vite.config.ts ├── test-utils.ts ├── transform-plugin │ ├── __tests__ │ │ ├── base │ │ │ └── transform-plugin.spec.ts │ │ ├── tests.ts │ │ └── transform-plugin.spec.ts │ ├── index.html │ ├── index.js │ ├── package.json │ ├── plugin-dep-load.js │ ├── plugin-dep.js │ ├── vite.config-base.js │ └── vite.config.js ├── tsconfig-json-load-error │ ├── __tests__ │ │ ├── serve.ts │ │ └── tsconfig-json-load-error.spec.ts │ ├── has-error │ │ ├── main.ts │ │ └── tsconfig.json │ ├── index.html │ ├── package.json │ ├── src │ │ └── main.ts │ └── tsconfig.json ├── tsconfig-json │ ├── __tests__ │ │ └── tsconfig-json.spec.ts │ ├── index.html │ ├── nested-with-extends │ │ ├── main.ts │ │ ├── not-used-type.ts │ │ └── tsconfig.json │ ├── nested │ │ ├── main.ts │ │ ├── not-used-type.ts │ │ └── tsconfig.json │ ├── package.json │ ├── src │ │ ├── decorator.ts │ │ ├── main.ts │ │ └── not-used-type.ts │ └── tsconfig.json ├── tsconfig.json ├── vitestGlobalSetup.ts ├── vitestSetup.ts ├── wasm │ ├── __tests__ │ │ └── wasm.spec.ts │ ├── add.wasm │ ├── heavy.wasm │ ├── heavy.wasm.map │ ├── index.html │ ├── light.wasm │ ├── package.json │ ├── vite.config.ts │ └── worker.js └── worker │ ├── __tests__ │ ├── es │ │ └── worker-es.spec.ts │ ├── iife │ │ └── worker-iife.spec.ts │ ├── relative-base-iife │ │ └── worker-relative-base-iife.spec.ts │ ├── relative-base │ │ └── worker-relative-base.spec.ts │ ├── sourcemap-hidden │ │ └── worker-sourcemap-hidden.spec.ts │ ├── sourcemap-inline │ │ └── worker-sourcemap-inline.spec.ts │ └── sourcemap │ │ └── worker-sourcemap.spec.ts │ ├── classic-esm.js │ ├── classic-shared-worker.js │ ├── classic-worker.js │ ├── deeply-nested-second-worker.js │ ├── deeply-nested-third-worker.js │ ├── deeply-nested-worker.js │ ├── dep-cjs │ ├── index.cjs │ └── package.json │ ├── dep-self-reference-url-worker │ ├── index.js │ ├── package.json │ └── worker.js │ ├── dep-to-optimize │ ├── index.js │ └── package.json │ ├── emit-chunk-dynamic-import-worker.js │ ├── emit-chunk-nested-worker.js │ ├── emit-chunk-sub-worker.js │ ├── importMetaGlob.worker.js │ ├── importMetaGlobEager.worker.js │ ├── index.html │ ├── module-and-worker.js │ ├── modules │ ├── module0.js │ ├── module1.js │ ├── module2.js │ ├── module3.js │ ├── test-plugin.js │ └── workerImport.ts │ ├── my-inline-shared-worker.ts │ ├── my-shared-worker.ts │ ├── my-worker.ts │ ├── package.json │ ├── possible-ts-output-worker.mjs │ ├── public │ └── classic.js │ ├── self-reference-url-worker.js │ ├── self-reference-worker.js │ ├── simple-worker.js │ ├── sub-worker.js │ ├── url-shared-worker.js │ ├── url-worker.js │ ├── vite.config-es.js │ ├── vite.config-iife.js │ ├── vite.config-relative-base-iife.js │ ├── vite.config-relative-base.js │ ├── vite.config-sourcemap-hidden.js │ ├── vite.config-sourcemap-inline.js │ ├── vite.config-sourcemap.js │ ├── vite.svg │ ├── worker-nested-worker.js │ ├── worker-plugin-test-plugin.js │ ├── worker-sourcemap-config.js │ └── worker │ ├── main-classic.js │ ├── main-deeply-nested.js │ ├── main-format-es.js │ ├── main-module.js │ ├── main-url.js │ └── main.js ├── pnpm-lock.yaml ├── pnpm-workspace.yaml ├── scripts ├── docs-check.sh ├── extendCommitHash.ts ├── publishCI.ts ├── release.ts ├── releaseUtils.ts └── tsconfig.json ├── vitest.config.e2e.ts └── vitest.config.ts /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto eol=lf 2 | -------------------------------------------------------------------------------- /docs/.vitepress/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /docs/images/community/placeholder.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitejs/vite/e0586de502aa82a372039ec6cac50cf69414e6fc/docs/images/community/placeholder.jpg -------------------------------------------------------------------------------- /docs/images/diagrams.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitejs/vite/e0586de502aa82a372039ec6cac50cf69414e6fc/docs/images/diagrams.fig -------------------------------------------------------------------------------- /docs/images/v3-docs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitejs/vite/e0586de502aa82a372039ec6cac50cf69414e6fc/docs/images/v3-docs.png -------------------------------------------------------------------------------- /docs/images/v3-new-open-issues-and-PRs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitejs/vite/e0586de502aa82a372039ec6cac50cf69414e6fc/docs/images/v3-new-open-issues-and-PRs.png -------------------------------------------------------------------------------- /docs/images/v3-open-issues-and-PRs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitejs/vite/e0586de502aa82a372039ec6cac50cf69414e6fc/docs/images/v3-open-issues-and-PRs.png -------------------------------------------------------------------------------- /docs/images/vercel-configuration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitejs/vite/e0586de502aa82a372039ec6cac50cf69414e6fc/docs/images/vercel-configuration.png -------------------------------------------------------------------------------- /docs/images/vite-plugin-inspect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitejs/vite/e0586de502aa82a372039ec6cac50cf69414e6fc/docs/images/vite-plugin-inspect.png -------------------------------------------------------------------------------- /docs/public/ecosystem-vite4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitejs/vite/e0586de502aa82a372039ec6cac50cf69414e6fc/docs/public/ecosystem-vite4.png -------------------------------------------------------------------------------- /docs/public/logo-uwu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitejs/vite/e0586de502aa82a372039ec6cac50cf69414e6fc/docs/public/logo-uwu.png -------------------------------------------------------------------------------- /docs/public/logo-with-shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitejs/vite/e0586de502aa82a372039ec6cac50cf69414e6fc/docs/public/logo-with-shadow.png -------------------------------------------------------------------------------- /docs/public/noise.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitejs/vite/e0586de502aa82a372039ec6cac50cf69414e6fc/docs/public/noise.png -------------------------------------------------------------------------------- /docs/public/og-image-announcing-vite3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitejs/vite/e0586de502aa82a372039ec6cac50cf69414e6fc/docs/public/og-image-announcing-vite3.png -------------------------------------------------------------------------------- /docs/public/og-image-announcing-vite4-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitejs/vite/e0586de502aa82a372039ec6cac50cf69414e6fc/docs/public/og-image-announcing-vite4-3.png -------------------------------------------------------------------------------- /docs/public/og-image-announcing-vite4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitejs/vite/e0586de502aa82a372039ec6cac50cf69414e6fc/docs/public/og-image-announcing-vite4.png -------------------------------------------------------------------------------- /docs/public/og-image-announcing-vite5-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitejs/vite/e0586de502aa82a372039ec6cac50cf69414e6fc/docs/public/og-image-announcing-vite5-1.png -------------------------------------------------------------------------------- /docs/public/og-image-announcing-vite5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitejs/vite/e0586de502aa82a372039ec6cac50cf69414e6fc/docs/public/og-image-announcing-vite5.png -------------------------------------------------------------------------------- /docs/public/og-image-announcing-vite6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitejs/vite/e0586de502aa82a372039ec6cac50cf69414e6fc/docs/public/og-image-announcing-vite6.png -------------------------------------------------------------------------------- /docs/public/og-image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitejs/vite/e0586de502aa82a372039ec6cac50cf69414e6fc/docs/public/og-image.jpg -------------------------------------------------------------------------------- /docs/public/vite.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitejs/vite/e0586de502aa82a372039ec6cac50cf69414e6fc/docs/public/vite.mp3 -------------------------------------------------------------------------------- /docs/public/vite4-3-hmr-time.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitejs/vite/e0586de502aa82a372039ec6cac50cf69414e6fc/docs/public/vite4-3-hmr-time.png -------------------------------------------------------------------------------- /docs/public/vite4-3-startup-time.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitejs/vite/e0586de502aa82a372039ec6cac50cf69414e6fc/docs/public/vite4-3-startup-time.png -------------------------------------------------------------------------------- /docs/public/vite6-npm-weekly-downloads.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitejs/vite/e0586de502aa82a372039ec6cac50cf69414e6fc/docs/public/vite6-npm-weekly-downloads.png -------------------------------------------------------------------------------- /packages/create-vite/index.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | import './dist/index.js' 4 | -------------------------------------------------------------------------------- /packages/create-vite/template-lit-ts/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /packages/create-vite/template-preact-ts/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /packages/create-vite/template-qwik-ts/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /packages/create-vite/template-qwik/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /packages/create-vite/template-react-ts/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /packages/create-vite/template-solid-ts/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /packages/create-vite/template-svelte-ts/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["svelte.svelte-vscode"] 3 | } 4 | -------------------------------------------------------------------------------- /packages/create-vite/template-svelte-ts/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | -------------------------------------------------------------------------------- /packages/create-vite/template-svelte/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["svelte.svelte-vscode"] 3 | } 4 | -------------------------------------------------------------------------------- /packages/create-vite/template-svelte/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | -------------------------------------------------------------------------------- /packages/create-vite/template-vanilla-ts/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /packages/create-vite/template-vue-ts/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["Vue.volar"] 3 | } 4 | -------------------------------------------------------------------------------- /packages/create-vite/template-vue-ts/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /packages/create-vite/template-vue/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["Vue.volar"] 3 | } 4 | -------------------------------------------------------------------------------- /packages/create-vite/template-vue/src/main.js: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import './style.css' 3 | import App from './App.vue' 4 | 5 | createApp(App).mount('#app') 6 | -------------------------------------------------------------------------------- /packages/vite/misc/false.d.ts: -------------------------------------------------------------------------------- 1 | declare const result: boolean 2 | export default result 3 | -------------------------------------------------------------------------------- /packages/vite/misc/false.js: -------------------------------------------------------------------------------- 1 | export default false 2 | -------------------------------------------------------------------------------- /packages/vite/misc/true.d.ts: -------------------------------------------------------------------------------- 1 | declare const result: boolean 2 | export default result 3 | -------------------------------------------------------------------------------- /packages/vite/misc/true.js: -------------------------------------------------------------------------------- 1 | export default true 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/env/.env: -------------------------------------------------------------------------------- 1 | VITE_APP_BASE_ROUTE=/ 2 | VITE_APP_BASE_URL=$VITE_APP_BASE_ROUTE 3 | 4 | VVITE_A=A 5 | VVITE_B=B 6 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/env/.env.development: -------------------------------------------------------------------------------- 1 | VITE_ENV1=ENV1 2 | VITE_ENV2=ENV2 3 | VITE_ENV3=ENV3 4 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/env/.env.development2: -------------------------------------------------------------------------------- 1 | VITE_SOURCE=source 2 | VITE_APP_BASE_ROUTE=$VITE_SOURCE 3 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/env/.env.existing: -------------------------------------------------------------------------------- 1 | VITE_ENV_TEST_ENV=DOTENV 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/env/.env.production: -------------------------------------------------------------------------------- 1 | VITE_APP_BASE_ROUTE=/app/ 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/env/.env.testing: -------------------------------------------------------------------------------- 1 | NODE_ENV=development -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/fixtures/cjs-ssr-dep/index.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-undef 2 | module.exports = { 3 | hello: () => 'world', 4 | } 5 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/fixtures/cjs-ssr-dep/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@vitejs/cjs-ssr-dep", 3 | "private": true, 4 | "version": "0.0.0" 5 | } 6 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/fixtures/config/entry/imports-field.ts: -------------------------------------------------------------------------------- 1 | export default 'imports-field' 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/fixtures/config/native-import/basic.js: -------------------------------------------------------------------------------- 1 | export default { 2 | value: 'works', 3 | } 4 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/fixtures/config/plugin-module-condition/index.cjs: -------------------------------------------------------------------------------- 1 | module.exports = 'require condition' 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/fixtures/config/plugin-module-condition/index.d.ts: -------------------------------------------------------------------------------- 1 | const str: string 2 | export default str 3 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/fixtures/config/plugin-module-condition/index.mjs: -------------------------------------------------------------------------------- 1 | export default 'import condition' 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/fixtures/config/plugin-module-condition/module.mjs: -------------------------------------------------------------------------------- 1 | export default 'module condition' 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/fixtures/config/siblings/foo.ts: -------------------------------------------------------------------------------- 1 | import lodash from 'lodash' 2 | 3 | export const array = lodash.partition([1, 2, 3, 4], (n) => n % 2) 4 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/fixtures/dynamic-import/dep.mjs: -------------------------------------------------------------------------------- 1 | export const hello = 'hello' 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/fixtures/dynamic-import/entry.mjs: -------------------------------------------------------------------------------- 1 | export async function main() { 2 | const mod = await import('./dep.mjs') 3 | console.log(mod) 4 | } 5 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/fixtures/environment-alias/test.client.js: -------------------------------------------------------------------------------- 1 | export const msg = `[success] (client) alias to mod path` 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/fixtures/environment-alias/test.rsc.js: -------------------------------------------------------------------------------- 1 | export const msg = `[success] (rsc) alias to mod path` 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/fixtures/environment-alias/test.ssr.js: -------------------------------------------------------------------------------- 1 | export const msg = `[success] (ssr) alias to mod path` 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/fixtures/file-url/entry.js: -------------------------------------------------------------------------------- 1 | export default 'ok' 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/fixtures/file-url/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "module" 3 | } 4 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/fixtures/runner-import/basic.ts: -------------------------------------------------------------------------------- 1 | interface Test { 2 | field: true 3 | } 4 | 5 | export const test: Test = { 6 | field: true, 7 | } 8 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/fixtures/runner-import/cjs.js: -------------------------------------------------------------------------------- 1 | module.exports = {} 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/fixtures/runner-import/dynamic-import-dep.ts: -------------------------------------------------------------------------------- 1 | export default 'ok' 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/fixtures/runner-import/dynamic-import.ts: -------------------------------------------------------------------------------- 1 | export default () => import('./dynamic-import-dep') 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/fixtures/shared-plugins/minify/entry.js: -------------------------------------------------------------------------------- 1 | function main() { 2 | console.log('test') 3 | } 4 | main() 5 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/fixtures/test-dep-conditions-app/entry-with-module.js: -------------------------------------------------------------------------------- 1 | import dep from '@vitejs/test-dep-conditions/with-module' 2 | export default dep 3 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/fixtures/test-dep-conditions-app/entry.css: -------------------------------------------------------------------------------- 1 | @import '@vitejs/test-dep-conditions'; 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/fixtures/test-dep-conditions-app/entry.js: -------------------------------------------------------------------------------- 1 | import dep from '@vitejs/test-dep-conditions' 2 | export default dep 3 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/fixtures/test-dep-conditions/dir/index.default.js: -------------------------------------------------------------------------------- 1 | export default 'dir/index.default.js' 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/fixtures/test-dep-conditions/dir/index.module.js: -------------------------------------------------------------------------------- 1 | export default 'dir/index.module.js' 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/fixtures/test-dep-conditions/index.browser.js: -------------------------------------------------------------------------------- 1 | export default 'index.browser.js' 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/fixtures/test-dep-conditions/index.css: -------------------------------------------------------------------------------- 1 | .test-css { 2 | color: orange; 3 | } 4 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/fixtures/test-dep-conditions/index.custom1.js: -------------------------------------------------------------------------------- 1 | export default 'index.custom1.js' 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/fixtures/test-dep-conditions/index.default.js: -------------------------------------------------------------------------------- 1 | export default 'index.default.js' 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/fixtures/test-dep-conditions/index.worker.js: -------------------------------------------------------------------------------- 1 | export default 'index.worker.js' 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/fixtures/watch-rebuild-manifest/dep.js: -------------------------------------------------------------------------------- 1 | console.log('dep.js') 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/fixtures/watch-rebuild-manifest/entry.js: -------------------------------------------------------------------------------- 1 | console.log('entry.js') 2 | console.log(import('./dep.js')) 3 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/fixtures/watch-rebuild-manifest/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "module" 3 | } 4 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/fixtures/worker-dynamic/dynamic.js: -------------------------------------------------------------------------------- 1 | export default 'dynamic ok' 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/packages/build-project/index.html: -------------------------------------------------------------------------------- 1 |

Hello world

2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/packages/child/index.js: -------------------------------------------------------------------------------- 1 | export default true 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/packages/child/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@vitejs/child", 3 | "type": "module", 4 | "main": "./index.js" 5 | } 6 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/packages/module/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mylib", 3 | "type": "module" 4 | } 5 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/packages/name/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mylib" 3 | } 4 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/packages/noname/package.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/packages/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "named-testing-package" 3 | } 4 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/packages/parent/index.ts: -------------------------------------------------------------------------------- 1 | // @ts-expect-error not typed 2 | import child from '@vitejs/child' 3 | 4 | export default { 5 | child, 6 | } 7 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/plugins/dynamicImportVar/mods/hello.js: -------------------------------------------------------------------------------- 1 | export function hello() { 2 | return 'hello' 3 | } 4 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/plugins/dynamicImportVar/mods/hi.js: -------------------------------------------------------------------------------- 1 | export function hi() { 2 | return 'hi' 3 | } 4 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/plugins/fixtures/css-module-compose/css/bar.module.css: -------------------------------------------------------------------------------- 1 | .bar { 2 | display: block; 3 | background: #f0f; 4 | } 5 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/plugins/importGlob/fixture-a/.gitignore: -------------------------------------------------------------------------------- 1 | !/node_modules/ 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/plugins/importGlob/fixture-a/modules/a.ts: -------------------------------------------------------------------------------- 1 | export const name = 'a' 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/plugins/importGlob/fixture-a/modules/b.ts: -------------------------------------------------------------------------------- 1 | export const name = 'b' 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/plugins/importGlob/fixture-a/sibling.ts: -------------------------------------------------------------------------------- 1 | export const name = 'I am your sibling!' 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/plugins/importGlob/fixture-b/a.ts: -------------------------------------------------------------------------------- 1 | export const name = 'a' 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/plugins/importGlob/fixture-b/b.ts: -------------------------------------------------------------------------------- 1 | export const name = 'b' 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/__tests__/plugins/importGlob/fixture-b/index.ts: -------------------------------------------------------------------------------- 1 | export { name as a } from './a' 2 | export { name as b } from './b' 3 | -------------------------------------------------------------------------------- /packages/vite/src/node/server/__tests__/fixtures/lerna/nested/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true 3 | } 4 | -------------------------------------------------------------------------------- /packages/vite/src/node/server/__tests__/fixtures/none/nested/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true 3 | } 4 | -------------------------------------------------------------------------------- /packages/vite/src/node/server/__tests__/fixtures/pnpm/nested/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true 3 | } 4 | -------------------------------------------------------------------------------- /packages/vite/src/node/server/__tests__/fixtures/pnpm/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true 3 | } 4 | -------------------------------------------------------------------------------- /packages/vite/src/node/server/__tests__/fixtures/watcher/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "type": "module" 4 | } 5 | -------------------------------------------------------------------------------- /packages/vite/src/node/server/__tests__/fixtures/yarn/nested/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true 3 | } 4 | -------------------------------------------------------------------------------- /packages/vite/src/node/server/__tests__/fixtures/yarn/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "workspaces": [ 4 | "nested" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/__tests__/fixtures/errors/syntax-error-dep.js: -------------------------------------------------------------------------------- 1 | import './syntax-error.js' 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/__tests__/fixtures/errors/syntax-error-dep.ts: -------------------------------------------------------------------------------- 1 | import './syntax-error.ts' 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/__tests__/fixtures/errors/syntax-error.js: -------------------------------------------------------------------------------- 1 | invalid code 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/__tests__/fixtures/errors/syntax-error.ts: -------------------------------------------------------------------------------- 1 | invalid code 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/__tests__/fixtures/file-url/test space.js: -------------------------------------------------------------------------------- 1 | export const msg = 'works' 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/__tests__/fixtures/file-url/test.js: -------------------------------------------------------------------------------- 1 | export const msg = 'works' 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/__tests__/fixtures/global/export.js: -------------------------------------------------------------------------------- 1 | export const global = 'ok' 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/__tests__/fixtures/global/test.js: -------------------------------------------------------------------------------- 1 | export default global 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/__tests__/fixtures/json/test.json: -------------------------------------------------------------------------------- 1 | { 2 | "hello": "this is json" 3 | } 4 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/__tests__/fixtures/modules/has-error.js: -------------------------------------------------------------------------------- 1 | throw new Error() 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/__tests__/fixtures/modules/has-invalid-import.js: -------------------------------------------------------------------------------- 1 | import { foo } from './non-existent.js' 2 | 3 | export const hello = 'world' 4 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/__tests__/fixtures/modules/import-meta.js: -------------------------------------------------------------------------------- 1 | export const dirname = import.meta.dirname 2 | export const filename = import.meta.filename 3 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/__tests__/fixtures/named-overwrite-all/dep2.js: -------------------------------------------------------------------------------- 1 | export const d = 'dep2-d' 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/runtime/__tests__/fixtures/a.ts: -------------------------------------------------------------------------------- 1 | export const a = 'a' 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/runtime/__tests__/fixtures/b.ts: -------------------------------------------------------------------------------- 1 | export const b = 'b' 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/runtime/__tests__/fixtures/basic.js: -------------------------------------------------------------------------------- 1 | export const name = 'basic' 2 | 3 | export const meta = import.meta 4 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/runtime/__tests__/fixtures/circular/circular-a.js: -------------------------------------------------------------------------------- 1 | export { b } from './circular-b' 2 | export const a = 'a' 3 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/runtime/__tests__/fixtures/circular/circular-b.js: -------------------------------------------------------------------------------- 1 | export { a } from './circular-a' 2 | export const b = 'b' 3 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/runtime/__tests__/fixtures/cjs-external-existing.js: -------------------------------------------------------------------------------- 1 | import { hello } from '@vitejs/cjs-external' 2 | 3 | export const result = hello() 4 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/runtime/__tests__/fixtures/cjs-external-non-existing.js: -------------------------------------------------------------------------------- 1 | import { nonExisting } from '@vitejs/cjs-external' 2 | 3 | console.log(nonExisting) 4 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/runtime/__tests__/fixtures/cjs-external/index.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | hello: () => 'world', 3 | } 4 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/runtime/__tests__/fixtures/cyclic/action.js: -------------------------------------------------------------------------------- 1 | export function someAction() {} 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/runtime/__tests__/fixtures/cyclic/entry-cyclic.js: -------------------------------------------------------------------------------- 1 | export default async function main() { 2 | await import("./entry.js"); 3 | } 4 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/runtime/__tests__/fixtures/cyclic2/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "module" 3 | } 4 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/runtime/__tests__/fixtures/cyclic2/test1/dep1.js: -------------------------------------------------------------------------------- 1 | export const dep1 = { ok: true }; 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/runtime/__tests__/fixtures/cyclic2/test1/dep2.js: -------------------------------------------------------------------------------- 1 | import { dep1 } from "./index.js" 2 | export const dep2 = { ok: dep1.ok } 3 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/runtime/__tests__/fixtures/cyclic2/test2/dep1.js: -------------------------------------------------------------------------------- 1 | export const dep1 = { ok: true }; 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/runtime/__tests__/fixtures/cyclic2/test2/dep2.js: -------------------------------------------------------------------------------- 1 | import { dep1 } from "./index.js" 2 | export const dep2 = { ok: dep1.ok } 3 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/runtime/__tests__/fixtures/cyclic2/test2/index.js: -------------------------------------------------------------------------------- 1 | export { dep1 } from './dep1.js' 2 | export { dep2 } from "./dep2.js" 3 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/runtime/__tests__/fixtures/cyclic2/test3/dep1.js: -------------------------------------------------------------------------------- 1 | export const dep1 = { ok: true }; 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/runtime/__tests__/fixtures/cyclic2/test3/dep2.js: -------------------------------------------------------------------------------- 1 | import { dep1 } from "./index.js" 2 | export const dep2 = { ok: dep1.ok } 3 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/runtime/__tests__/fixtures/cyclic2/test4/dep1.js: -------------------------------------------------------------------------------- 1 | export const dep1 = { ok: true }; 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/runtime/__tests__/fixtures/cyclic2/test4/dep2.js: -------------------------------------------------------------------------------- 1 | import { dep1 } from "./index.js" 2 | export const dep2 = { ok: dep1.ok } 3 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/runtime/__tests__/fixtures/cyclic2/test4/index.js: -------------------------------------------------------------------------------- 1 | export * from './dep1.js' 2 | export * from './dep2.js' 3 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/runtime/__tests__/fixtures/cyclic2/test5/dep1.js: -------------------------------------------------------------------------------- 1 | export const dep1 = { ok: true }; 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/runtime/__tests__/fixtures/cyclic2/test5/dep2.js: -------------------------------------------------------------------------------- 1 | import { dep1 } from "./index.js" 2 | export const dep2 = { ok: dep1.ok } 3 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/runtime/__tests__/fixtures/cyclic2/test6/dep1.js: -------------------------------------------------------------------------------- 1 | import { dep2 } from "./dep2.js" 2 | export const dep1 = "dep1: " + dep2 3 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/runtime/__tests__/fixtures/cyclic2/test6/dep2.js: -------------------------------------------------------------------------------- 1 | import { dep1 } from "./dep1.js" 2 | export const dep2 = "dep2: " + dep1 3 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/runtime/__tests__/fixtures/cyclic2/test6/index.js: -------------------------------------------------------------------------------- 1 | import { dep1 } from './dep1.js' 2 | export { dep1 } 3 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/runtime/__tests__/fixtures/cyclic2/test7/IonTypes.js: -------------------------------------------------------------------------------- 1 | export const IonTypes = { 2 | BLOB: 'Blob', 3 | }; 4 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/runtime/__tests__/fixtures/cyclic2/test7/README.md: -------------------------------------------------------------------------------- 1 | reproduction from https://github.com/vitest-dev/vitest/issues/4143#issuecomment-1724526796 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/runtime/__tests__/fixtures/cyclic2/test7/dom/Blob.js: -------------------------------------------------------------------------------- 1 | import { IonTypes } from '../Ion.js'; 2 | export const Blob = IonTypes.BLOB; 3 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/runtime/__tests__/fixtures/cyclic2/test7/dom/index.js: -------------------------------------------------------------------------------- 1 | export { Blob } from './Blob.js'; 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/runtime/__tests__/fixtures/cyclic2/test9/dep.js: -------------------------------------------------------------------------------- 1 | import dep from "./index.js" 2 | export default dep 3 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/runtime/__tests__/fixtures/cyclic2/test9/index.js: -------------------------------------------------------------------------------- 1 | import dep from "./dep.js"; 2 | export default dep 3 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/runtime/__tests__/fixtures/default-string.ts: -------------------------------------------------------------------------------- 1 | const str: string = 'hello world' 2 | 3 | export default str 4 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/runtime/__tests__/fixtures/esm-external-existing.js: -------------------------------------------------------------------------------- 1 | import { hello } from '@vitejs/esm-external' 2 | 3 | export const result = hello() 4 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/runtime/__tests__/fixtures/esm-external-non-existing.js: -------------------------------------------------------------------------------- 1 | import { nonExisting } from '@vitejs/esm-external' 2 | 3 | console.log(nonExisting) 4 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/runtime/__tests__/fixtures/esm-external/index.mjs: -------------------------------------------------------------------------------- 1 | export const hello = () => 'world' 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/runtime/__tests__/fixtures/execution-order-re-export/dep1.js: -------------------------------------------------------------------------------- 1 | console.log('dep1'); 2 | export {}; 3 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/runtime/__tests__/fixtures/execution-order-re-export/dep2.js: -------------------------------------------------------------------------------- 1 | console.log('dep2'); 2 | export {}; 3 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/runtime/__tests__/fixtures/execution-order-re-export/index.js: -------------------------------------------------------------------------------- 1 | export * from './dep1.js'; 2 | import './dep2.js' 3 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/runtime/__tests__/fixtures/has-error-first-comment.ts: -------------------------------------------------------------------------------- 1 | // comment 2 | throw new Error('__TEST__') 3 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/runtime/__tests__/fixtures/has-error-first.js: -------------------------------------------------------------------------------- 1 | throw new Error('__TEST__') 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/runtime/__tests__/fixtures/has-error.js: -------------------------------------------------------------------------------- 1 | // comment 2 | throw new Error('module error') 3 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/runtime/__tests__/fixtures/hmr.js: -------------------------------------------------------------------------------- 1 | export const hmr = import.meta.hot 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/runtime/__tests__/fixtures/installed.js: -------------------------------------------------------------------------------- 1 | export * from 'tinyspy' 2 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/runtime/__tests__/fixtures/live-binding/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "module" 3 | } 4 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/runtime/__tests__/fixtures/no-this/importee.js: -------------------------------------------------------------------------------- 1 | export function foo() { 2 | return this 3 | } 4 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/runtime/__tests__/fixtures/no-this/importer.js: -------------------------------------------------------------------------------- 1 | import { foo } from './importee.js' 2 | 3 | export const result = foo() 4 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/runtime/__tests__/fixtures/simple.js: -------------------------------------------------------------------------------- 1 | export const test = 'I am initialized' 2 | 3 | import.meta.hot?.accept() 4 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/runtime/__tests__/fixtures/test.css: -------------------------------------------------------------------------------- 1 | .test { 2 | color: red; 3 | } 4 | -------------------------------------------------------------------------------- /packages/vite/src/node/ssr/runtime/__tests__/fixtures/test.module.css: -------------------------------------------------------------------------------- 1 | .test { 2 | color: red; 3 | } 4 | -------------------------------------------------------------------------------- /packages/vite/src/node/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "exclude": ["**/__tests__"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/vite/src/types/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "//": "this file is just here to make pnpm happy with --frozen-lockfile", 3 | "version": "0.0.0" 4 | } 5 | -------------------------------------------------------------------------------- /packages/vite/types/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "//": "this file is here to make typescript happy when moduleResolution=node16+", 3 | "version": "0.0.0" 4 | } 5 | -------------------------------------------------------------------------------- /playground/alias/customResolver.js: -------------------------------------------------------------------------------- 1 | export const msg = `[success] alias to custom-resolver path` 2 | -------------------------------------------------------------------------------- /playground/alias/dir/from-script-src.js: -------------------------------------------------------------------------------- 1 | document.querySelector('.from-script-src').textContent = 2 | '[success] from script src' 3 | -------------------------------------------------------------------------------- /playground/alias/dir/module/index.js: -------------------------------------------------------------------------------- 1 | export const msg = `[success] aliased module` 2 | -------------------------------------------------------------------------------- /playground/alias/dir/module/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@vitejs/test-aliased-module", 3 | "private": true, 4 | "type": "module", 5 | "version": "0.0.0" 6 | } 7 | -------------------------------------------------------------------------------- /playground/alias/dir/test.css: -------------------------------------------------------------------------------- 1 | body { 2 | color: grey; 3 | } 4 | -------------------------------------------------------------------------------- /playground/alias/dir/test.js: -------------------------------------------------------------------------------- 1 | export const msg = `[success] alias to directory` 2 | -------------------------------------------------------------------------------- /playground/alias/test.js: -------------------------------------------------------------------------------- 1 | export const msg = `[success] alias to fs path` 2 | -------------------------------------------------------------------------------- /playground/assets-sanitize/.env: -------------------------------------------------------------------------------- 1 | KEY=unsafe 2 | -------------------------------------------------------------------------------- /playground/assets/asset/main.js: -------------------------------------------------------------------------------- 1 | function text(el, text) { 2 | document.querySelector(el).textContent = text 3 | } 4 | text('.relative-js', 'hello') 5 | -------------------------------------------------------------------------------- /playground/assets/asset/percent%.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitejs/vite/e0586de502aa82a372039ec6cac50cf69414e6fc/playground/assets/asset/percent%.png -------------------------------------------------------------------------------- /playground/assets/asset/style.css: -------------------------------------------------------------------------------- 1 | .relative-css { 2 | color: red; 3 | } 4 | -------------------------------------------------------------------------------- /playground/assets/css/css-url-url.css: -------------------------------------------------------------------------------- 1 | .css-url-svg-in-url { 2 | background: url(../nested/fragment-bg-hmr2.svg); 3 | background-size: 10px; 4 | } 5 | -------------------------------------------------------------------------------- /playground/assets/css/foo.module.css: -------------------------------------------------------------------------------- 1 | .foo-module { 2 | color: red; 3 | } 4 | -------------------------------------------------------------------------------- /playground/assets/css/import.css: -------------------------------------------------------------------------------- 1 | .import-css { 2 | color: #0088ff; 3 | } 4 | -------------------------------------------------------------------------------- /playground/assets/css/manual-chunks.css: -------------------------------------------------------------------------------- 1 | .css-manual-chunks-relative { 2 | background: url(../nested/asset.png); 3 | background-size: 10px; 4 | } 5 | -------------------------------------------------------------------------------- /playground/assets/css/nested/at-imported-css-url.css: -------------------------------------------------------------------------------- 1 | .css-url-relative-at-imported { 2 | background: url(../../nested/asset.png); 3 | background-size: 10px; 4 | } 5 | -------------------------------------------------------------------------------- /playground/assets/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitejs/vite/e0586de502aa82a372039ec6cac50cf69414e6fc/playground/assets/favicon.ico -------------------------------------------------------------------------------- /playground/assets/fonts/Inter-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitejs/vite/e0586de502aa82a372039ec6cac50cf69414e6fc/playground/assets/fonts/Inter-Italic.woff -------------------------------------------------------------------------------- /playground/assets/fonts/Inter-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitejs/vite/e0586de502aa82a372039ec6cac50cf69414e6fc/playground/assets/fonts/Inter-Italic.woff2 -------------------------------------------------------------------------------- /playground/assets/foo.js: -------------------------------------------------------------------------------- 1 | console.log('hi') 2 | -------------------------------------------------------------------------------- /playground/assets/manifest.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /playground/assets/nested/asset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitejs/vite/e0586de502aa82a372039ec6cac50cf69414e6fc/playground/assets/nested/asset.png -------------------------------------------------------------------------------- /playground/assets/nested/asset[small].png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitejs/vite/e0586de502aa82a372039ec6cac50cf69414e6fc/playground/assets/nested/asset[small].png -------------------------------------------------------------------------------- /playground/assets/nested/foo.unknown: -------------------------------------------------------------------------------- 1 | custom file 2 | -------------------------------------------------------------------------------- /playground/assets/nested/html-only-asset.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitejs/vite/e0586de502aa82a372039ec6cac50cf69414e6fc/playground/assets/nested/html-only-asset.jpg -------------------------------------------------------------------------------- /playground/assets/nested/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitejs/vite/e0586de502aa82a372039ec6cac50cf69414e6fc/playground/assets/nested/icon.png -------------------------------------------------------------------------------- /playground/assets/nested/test.js: -------------------------------------------------------------------------------- 1 | export default class a { 2 | name = 'a' 3 | } 4 | -------------------------------------------------------------------------------- /playground/assets/nested/with-single'quote.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitejs/vite/e0586de502aa82a372039ec6cac50cf69414e6fc/playground/assets/nested/with-single'quote.png -------------------------------------------------------------------------------- /playground/assets/nested/テスト-測試-white space.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitejs/vite/e0586de502aa82a372039ec6cac50cf69414e6fc/playground/assets/nested/テスト-測試-white space.png -------------------------------------------------------------------------------- /playground/assets/static/bar: -------------------------------------------------------------------------------- 1 | bar 2 | -------------------------------------------------------------------------------- /playground/assets/static/foo.css: -------------------------------------------------------------------------------- 1 | .foo-public { 2 | color: red; 3 | } 4 | -------------------------------------------------------------------------------- /playground/assets/static/foo.json: -------------------------------------------------------------------------------- 1 | { 2 | "foo": "bar" 3 | } 4 | -------------------------------------------------------------------------------- /playground/assets/static/foo.txt: -------------------------------------------------------------------------------- 1 | foo -------------------------------------------------------------------------------- /playground/assets/static/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitejs/vite/e0586de502aa82a372039ec6cac50cf69414e6fc/playground/assets/static/icon.png -------------------------------------------------------------------------------- /playground/assets/static/import-expression.js: -------------------------------------------------------------------------------- 1 | document.querySelector('.import-expression').textContent += '[success]' 2 | -------------------------------------------------------------------------------- /playground/assets/static/raw.css: -------------------------------------------------------------------------------- 1 | .raw-css { 2 | color: red; 3 | } 4 | -------------------------------------------------------------------------------- /playground/assets/static/raw.js: -------------------------------------------------------------------------------- 1 | document.querySelector('.raw-js').textContent = 2 | '[success] Raw js from /public loaded' 3 | -------------------------------------------------------------------------------- /playground/assets/static/raw.mts: -------------------------------------------------------------------------------- 1 | export default function foobar() { 2 | return 1 + 2 3 | } 4 | -------------------------------------------------------------------------------- /playground/assets/static/raw.ts: -------------------------------------------------------------------------------- 1 | export default function other() { 2 | return 1 + 2 3 | } 4 | -------------------------------------------------------------------------------- /playground/assets/テスト-測試-white space.js: -------------------------------------------------------------------------------- 1 | console.log('test Unicode') 2 | -------------------------------------------------------------------------------- /playground/backend-integration/dir/foo.css: -------------------------------------------------------------------------------- 1 | .windows-path-foo { 2 | color: blue; 3 | } 4 | -------------------------------------------------------------------------------- /playground/backend-integration/frontend/entrypoints/foo.pcss: -------------------------------------------------------------------------------- 1 | .foo_pcss { 2 | color: blue; 3 | } 4 | -------------------------------------------------------------------------------- /playground/backend-integration/frontend/entrypoints/nested/blue.scss: -------------------------------------------------------------------------------- 1 | $primary: #cc0000; 2 | 3 | .text-primary { 4 | color: $primary; 5 | } 6 | -------------------------------------------------------------------------------- /playground/backend-integration/frontend/entrypoints/nested/sub.ts: -------------------------------------------------------------------------------- 1 | import '../../styles/imported.css' 2 | -------------------------------------------------------------------------------- /playground/backend-integration/frontend/styles/imported.css: -------------------------------------------------------------------------------- 1 | .imported { 2 | color: green; 3 | } 4 | -------------------------------------------------------------------------------- /playground/backend-integration/frontend/styles/tailwind.css: -------------------------------------------------------------------------------- 1 | @import 'tailwindcss'; 2 | -------------------------------------------------------------------------------- /playground/backend-integration/frontend/styles/url.css: -------------------------------------------------------------------------------- 1 | .url { 2 | color: red; 3 | } 4 | -------------------------------------------------------------------------------- /playground/build-old/dynamic.js: -------------------------------------------------------------------------------- 1 | export default 'success' 2 | -------------------------------------------------------------------------------- /playground/cli-module/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
vite cli in "type":"module" package works!
4 | -------------------------------------------------------------------------------- /playground/cli-module/index.js: -------------------------------------------------------------------------------- 1 | console.log('vite cli in "type":"module" package works!') 2 | -------------------------------------------------------------------------------- /playground/cli/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
vite cli works!
4 | -------------------------------------------------------------------------------- /playground/cli/index.js: -------------------------------------------------------------------------------- 1 | console.log('vite cli works!') 2 | -------------------------------------------------------------------------------- /playground/client-reload/index.html: -------------------------------------------------------------------------------- 1 | 2 |

Test Client Reload

3 | 4 | 5 | -------------------------------------------------------------------------------- /playground/client-reload/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | 3 | export default defineConfig({ 4 | server: {}, 5 | }) 6 | -------------------------------------------------------------------------------- /playground/csp/dynamic.css: -------------------------------------------------------------------------------- 1 | .dynamic { 2 | color: red; 3 | } 4 | -------------------------------------------------------------------------------- /playground/csp/dynamic.js: -------------------------------------------------------------------------------- 1 | import './dynamic.css' 2 | 3 | document.querySelector('.dynamic-js').textContent = 'dynamic-js: ok' 4 | -------------------------------------------------------------------------------- /playground/csp/from-js.css: -------------------------------------------------------------------------------- 1 | .from-js { 2 | color: blue; 3 | } 4 | -------------------------------------------------------------------------------- /playground/csp/index.js: -------------------------------------------------------------------------------- 1 | import './from-js.css' 2 | 3 | document.querySelector('.js').textContent = 'js: ok' 4 | 5 | import('./dynamic.js') 6 | -------------------------------------------------------------------------------- /playground/csp/linked.css: -------------------------------------------------------------------------------- 1 | .linked { 2 | color: blue; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css-codesplit-cjs/index.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | -------------------------------------------------------------------------------- /playground/css-codesplit-cjs/main.css: -------------------------------------------------------------------------------- 1 | h1 { 2 | color: red; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css-codesplit-cjs/other.js: -------------------------------------------------------------------------------- 1 | import './style.css' 2 | -------------------------------------------------------------------------------- /playground/css-codesplit-cjs/style.css: -------------------------------------------------------------------------------- 1 | h2 { 2 | color: blue; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css-codesplit/async-js.css: -------------------------------------------------------------------------------- 1 | .async-js { 2 | color: blue; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css-codesplit/async-js.js: -------------------------------------------------------------------------------- 1 | // a JS file that becomes an empty file but imports CSS files 2 | import './async-js.css' 3 | -------------------------------------------------------------------------------- /playground/css-codesplit/async.css: -------------------------------------------------------------------------------- 1 | .dynamic { 2 | color: green; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css-codesplit/chunk.css: -------------------------------------------------------------------------------- 1 | .chunk { 2 | color: magenta; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css-codesplit/inline.css: -------------------------------------------------------------------------------- 1 | .inline { 2 | color: yellow; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css-codesplit/main.css: -------------------------------------------------------------------------------- 1 | h1 { 2 | color: red; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css-codesplit/mod.module.css: -------------------------------------------------------------------------------- 1 | .mod { 2 | color: yellow; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css-codesplit/order/base.css: -------------------------------------------------------------------------------- 1 | .order-bulk { 2 | color: blue; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css-codesplit/order/dynamic.css: -------------------------------------------------------------------------------- 1 | .order-bulk { 2 | color: green; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css-codesplit/shared-css-no-js.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |

Share CSS, no JS

4 | 5 | -------------------------------------------------------------------------------- /playground/css-codesplit/shared-css-theme.css: -------------------------------------------------------------------------------- 1 | h1 { 2 | color: red; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css-codesplit/style.css: -------------------------------------------------------------------------------- 1 | h2 { 2 | color: blue; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css-codesplit/style2.css: -------------------------------------------------------------------------------- 1 | h2 { 2 | color: blue; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css-codesplit/style2.js: -------------------------------------------------------------------------------- 1 | import './style2.css' 2 | -------------------------------------------------------------------------------- /playground/css-dynamic-import/dynamic.css: -------------------------------------------------------------------------------- 1 | .css-dynamic-import { 2 | color: green; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css-dynamic-import/index.html: -------------------------------------------------------------------------------- 1 |

This should be green

2 | 3 | 4 | -------------------------------------------------------------------------------- /playground/css-dynamic-import/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@vitejs/test-css-dynamic-import", 3 | "private": true, 4 | "type": "module", 5 | "version": "0.0.0" 6 | } 7 | -------------------------------------------------------------------------------- /playground/css-dynamic-import/static.css: -------------------------------------------------------------------------------- 1 | .css-dynamic-import { 2 | color: red; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css-dynamic-import/static.js: -------------------------------------------------------------------------------- 1 | import './static.css' 2 | 3 | export const foo = 'foo' 4 | -------------------------------------------------------------------------------- /playground/css-lightningcss-root/root/index.html: -------------------------------------------------------------------------------- 1 |

url() dependency

2 |
3 | 4 | -------------------------------------------------------------------------------- /playground/css-lightningcss-root/root/main.js: -------------------------------------------------------------------------------- 1 | import './url-dep.css' 2 | -------------------------------------------------------------------------------- /playground/css-lightningcss-root/root/ok.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitejs/vite/e0586de502aa82a372039ec6cac50cf69414e6fc/playground/css-lightningcss-root/root/ok.png -------------------------------------------------------------------------------- /playground/css-lightningcss/composed.module.css: -------------------------------------------------------------------------------- 1 | .apply-color { 2 | color: turquoise; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css-lightningcss/composes-path-resolving.module.css: -------------------------------------------------------------------------------- 1 | .path-resolving-css { 2 | composes: apply-color from './composed.module.css'; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css-lightningcss/imported-at-import.css: -------------------------------------------------------------------------------- 1 | .imported-at-import { 2 | color: purple; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css-lightningcss/inline.module.css: -------------------------------------------------------------------------------- 1 | .apply-color-inline { 2 | color: turquoise; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css-lightningcss/inlined.css: -------------------------------------------------------------------------------- 1 | .inlined { 2 | color: green; 3 | background: url('./ok.png'); 4 | } 5 | -------------------------------------------------------------------------------- /playground/css-lightningcss/linked-at-import.css: -------------------------------------------------------------------------------- 1 | .linked-at-import { 2 | color: red; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css-lightningcss/linked.css: -------------------------------------------------------------------------------- 1 | @import './linked-at-import.css'; 2 | 3 | /* test nesting */ 4 | .wrapper { 5 | .linked { 6 | color: blue; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /playground/css-lightningcss/minify.css: -------------------------------------------------------------------------------- 1 | .test-minify { 2 | color: rgba(255, 255, 0, 0.7); 3 | } 4 | -------------------------------------------------------------------------------- /playground/css-lightningcss/mod.module.css: -------------------------------------------------------------------------------- 1 | .apply-color { 2 | color: turquoise; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css-lightningcss/nested/nested.css: -------------------------------------------------------------------------------- 1 | .nested-css-relative-asset { 2 | background-image: url('../ok.png'); 3 | width: 50px; 4 | height: 50px; 5 | } 6 | -------------------------------------------------------------------------------- /playground/css-lightningcss/ok.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitejs/vite/e0586de502aa82a372039ec6cac50cf69414e6fc/playground/css-lightningcss/ok.png -------------------------------------------------------------------------------- /playground/css-no-codesplit/async-js.css: -------------------------------------------------------------------------------- 1 | .async-js { 2 | color: blue; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css-no-codesplit/async-js.js: -------------------------------------------------------------------------------- 1 | // a JS file that becomes an empty file but imports CSS files 2 | import './async-js.css' 3 | -------------------------------------------------------------------------------- /playground/css-no-codesplit/index.js: -------------------------------------------------------------------------------- 1 | import('./async-js') 2 | -------------------------------------------------------------------------------- /playground/css-no-codesplit/shared-linked.css: -------------------------------------------------------------------------------- 1 | .shared-linked { 2 | color: blue; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css-no-codesplit/sub.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /playground/css-sourcemap/be-imported.css: -------------------------------------------------------------------------------- 1 | .be-imported { 2 | color: red; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css-sourcemap/imported-nested.sass: -------------------------------------------------------------------------------- 1 | $primary: red 2 | -------------------------------------------------------------------------------- /playground/css-sourcemap/imported-with-import.css: -------------------------------------------------------------------------------- 1 | @import '@/be-imported.css'; 2 | 3 | .imported-with-import { 4 | color: red; 5 | } 6 | -------------------------------------------------------------------------------- /playground/css-sourcemap/imported.css: -------------------------------------------------------------------------------- 1 | .imported { 2 | color: red; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css-sourcemap/imported.less: -------------------------------------------------------------------------------- 1 | .imported { 2 | &-less { 3 | color: @color; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /playground/css-sourcemap/imported.module.sass: -------------------------------------------------------------------------------- 1 | .imported 2 | &-sass-module 3 | color: red 4 | -------------------------------------------------------------------------------- /playground/css-sourcemap/imported.sass: -------------------------------------------------------------------------------- 1 | @use "/imported-nested.sass" 2 | 3 | .imported 4 | &-sass 5 | color: imported-nested.$primary 6 | -------------------------------------------------------------------------------- /playground/css-sourcemap/imported.sss: -------------------------------------------------------------------------------- 1 | .imported-sugarss 2 | color: red 3 | -------------------------------------------------------------------------------- /playground/css-sourcemap/imported.styl: -------------------------------------------------------------------------------- 1 | .imported 2 | &-stylus 3 | color blue-red-mixed 4 | -------------------------------------------------------------------------------- /playground/css-sourcemap/index.js: -------------------------------------------------------------------------------- 1 | export default 'hello' 2 | -------------------------------------------------------------------------------- /playground/css-sourcemap/input-map.css: -------------------------------------------------------------------------------- 1 | .input-map { 2 | color: #00f; 3 | } 4 | /*# sourceMappingURL=input-map.css.map */ 5 | -------------------------------------------------------------------------------- /playground/css-sourcemap/input-map.src.css: -------------------------------------------------------------------------------- 1 | .input-map { 2 | color: blue; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css-sourcemap/linked-with-import.css: -------------------------------------------------------------------------------- 1 | @import '@/be-imported.css'; 2 | 3 | .linked-with-import { 4 | color: red; 5 | } 6 | -------------------------------------------------------------------------------- /playground/css-sourcemap/linked.css: -------------------------------------------------------------------------------- 1 | .linked { 2 | color: red; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/__tests__/css.spec.ts: -------------------------------------------------------------------------------- 1 | import { tests } from './tests' 2 | 3 | tests(false) 4 | -------------------------------------------------------------------------------- /playground/css/aliased/bar.module.css: -------------------------------------------------------------------------------- 1 | .aliasedModule { 2 | color: blue; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/aliased/foo.css: -------------------------------------------------------------------------------- 1 | .aliased { 2 | color: blue; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/async-treeshaken.css: -------------------------------------------------------------------------------- 1 | .async-treeshaken { 2 | color: plum; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/async.css: -------------------------------------------------------------------------------- 1 | .async { 2 | color: teal; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/async/async-1.css: -------------------------------------------------------------------------------- 1 | .async-blue { 2 | color: blue; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/async/async-1.js: -------------------------------------------------------------------------------- 1 | import { createButton } from './base' 2 | import './async-1.css' 3 | 4 | createButton('async-blue') 5 | -------------------------------------------------------------------------------- /playground/css/async/async-2.css: -------------------------------------------------------------------------------- 1 | .async-green { 2 | color: green; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/async/async-2.js: -------------------------------------------------------------------------------- 1 | import { createButton } from './base' 2 | import './async-2.css' 3 | 4 | createButton('async-green') 5 | -------------------------------------------------------------------------------- /playground/css/async/async-3.module.css: -------------------------------------------------------------------------------- 1 | .async-pink { 2 | color: pink; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/async/base.css: -------------------------------------------------------------------------------- 1 | .btn { 2 | color: black; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/async/index.js: -------------------------------------------------------------------------------- 1 | import('./async-1.js') 2 | import('./async-2.js') 3 | import('./async-3.js') 4 | -------------------------------------------------------------------------------- /playground/css/charset.css: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | 3 | .utf8 { 4 | color: green; 5 | } 6 | -------------------------------------------------------------------------------- /playground/css/composed.module.css: -------------------------------------------------------------------------------- 1 | .apply-color { 2 | color: turquoise; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/composed.module.less: -------------------------------------------------------------------------------- 1 | .apply-color { 2 | color: blue; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/composed.module.scss: -------------------------------------------------------------------------------- 1 | .apply-color { 2 | color: orangered; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/css-dep-exports/index.js: -------------------------------------------------------------------------------- 1 | throw new Error('should not be imported') 2 | -------------------------------------------------------------------------------- /playground/css/css-dep-exports/style.css: -------------------------------------------------------------------------------- 1 | .css-dep-exports { 2 | color: purple; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/css-dep-exports/style.scss: -------------------------------------------------------------------------------- 1 | .css-dep-exports-sass { 2 | color: orange; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/css-dep/index.css: -------------------------------------------------------------------------------- 1 | .css-dep { 2 | color: purple; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/css-dep/index.js: -------------------------------------------------------------------------------- 1 | throw new Error('should not be imported') 2 | -------------------------------------------------------------------------------- /playground/css/css-dep/index.scss: -------------------------------------------------------------------------------- 1 | .css-dep-sass { 2 | color: orange; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/css-dep/index.styl: -------------------------------------------------------------------------------- 1 | .css-dep-stylus 2 | color red 3 | -------------------------------------------------------------------------------- /playground/css/css-js-dep/bar.module.css: -------------------------------------------------------------------------------- 1 | .cssJsDepModule { 2 | color: green; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/css-js-dep/foo.css: -------------------------------------------------------------------------------- 1 | .css-js-dep { 2 | color: green; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/css-js-dep/index.js: -------------------------------------------------------------------------------- 1 | import './foo.css' 2 | import barModuleClasses from './bar.module.css' 3 | 4 | export { barModuleClasses } 5 | -------------------------------------------------------------------------------- /playground/css/css-proxy-dep-nested/index.css: -------------------------------------------------------------------------------- 1 | .css-proxy-dep { 2 | color: purple; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/css-proxy-dep/index.css: -------------------------------------------------------------------------------- 1 | @import '@vitejs/test-css-proxy-dep-nested'; 2 | -------------------------------------------------------------------------------- /playground/css/dep.css: -------------------------------------------------------------------------------- 1 | @import '@vitejs/test-css-dep'; 2 | @import '@vitejs/test-css-dep-exports'; 3 | @import '@vitejs/test-css-proxy-dep'; 4 | -------------------------------------------------------------------------------- /playground/css/file-absolute.scss: -------------------------------------------------------------------------------- 1 | .sass-file-absolute { 2 | color: orange; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/folder with space/ok.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitejs/vite/e0586de502aa82a372039ec6cac50cf69414e6fc/playground/css/folder with space/ok.png -------------------------------------------------------------------------------- /playground/css/folder with space/space.css: -------------------------------------------------------------------------------- 1 | .import-with-space { 2 | color: green; 3 | background: url(spacefolder/ok.png); 4 | background-position: center; 5 | } 6 | -------------------------------------------------------------------------------- /playground/css/glob-dep.css: -------------------------------------------------------------------------------- 1 | @test; 2 | -------------------------------------------------------------------------------- /playground/css/glob-dep/bar.css: -------------------------------------------------------------------------------- 1 | .dir-dep-2 { 2 | color: grey; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/glob-dep/foo.css: -------------------------------------------------------------------------------- 1 | .dir-dep { 2 | color: grey; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/glob-dep/nested (dir)/baz.css: -------------------------------------------------------------------------------- 1 | .dir-dep-3 { 2 | color: grey; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/glob-import/bar.css: -------------------------------------------------------------------------------- 1 | .dir-import-2 { 2 | color: grey; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/glob-import/foo.css: -------------------------------------------------------------------------------- 1 | .dir-import { 2 | color: grey; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/imported-at-import.css: -------------------------------------------------------------------------------- 1 | .imported-at-import { 2 | color: purple; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/imported.scss: -------------------------------------------------------------------------------- 1 | $color: red; 2 | 3 | .at-import-scss { 4 | color: $color; 5 | } 6 | -------------------------------------------------------------------------------- /playground/css/imports-field.css: -------------------------------------------------------------------------------- 1 | .imports-field { 2 | color: red; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/imports-imports-field.css: -------------------------------------------------------------------------------- 1 | @import '#imports'; 2 | -------------------------------------------------------------------------------- /playground/css/inline.module.css: -------------------------------------------------------------------------------- 1 | .apply-color-inline { 2 | color: turquoise; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/inlined.css: -------------------------------------------------------------------------------- 1 | .inlined { 2 | color: green; 3 | background: url('./ok.png'); 4 | } 5 | -------------------------------------------------------------------------------- /playground/css/jsfile.css.js: -------------------------------------------------------------------------------- 1 | const message = 'from jsfile.css.js' 2 | export default message 3 | -------------------------------------------------------------------------------- /playground/css/layered/blue.css: -------------------------------------------------------------------------------- 1 | @media screen { 2 | .layers-blue { 3 | color: blue; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /playground/css/layered/green.css: -------------------------------------------------------------------------------- 1 | @media screen { 2 | .layers-green { 3 | color: green; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /playground/css/less-plugin.less: -------------------------------------------------------------------------------- 1 | @plugin "less-plugin/test.js"; 2 | 3 | .less-js-plugin { 4 | height: 1em; 5 | width: 1em; 6 | background-image: test(); 7 | } 8 | -------------------------------------------------------------------------------- /playground/css/less/ommer.less: -------------------------------------------------------------------------------- 1 | .less-at-import-url-ommer { 2 | color: darkorange; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/linked-at-import.css: -------------------------------------------------------------------------------- 1 | .linked-at-import { 2 | color: red; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/linked.css: -------------------------------------------------------------------------------- 1 | @import '=/linked-at-import.css'; 2 | 3 | /* test postcss nesting */ 4 | .wrapper { 5 | .linked { 6 | color: blue; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /playground/css/manual-chunk.css: -------------------------------------------------------------------------------- 1 | .manual-chunk { 2 | color: blue; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/minify.css: -------------------------------------------------------------------------------- 1 | .test-minify { 2 | color: rgba(255, 255, 0, 0.7); 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/mod.module.css: -------------------------------------------------------------------------------- 1 | .apply-color { 2 | color: turquoise; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/mod.module.scss: -------------------------------------------------------------------------------- 1 | .apply-color { 2 | color: orangered; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/nested/_partial.scss: -------------------------------------------------------------------------------- 1 | .sass-partial { 2 | color: orchid; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/nested/css-in-less-2.less: -------------------------------------------------------------------------------- 1 | .css-in-less-2 { 2 | color: blue; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/nested/css-in-less.css: -------------------------------------------------------------------------------- 1 | .css-in-less { 2 | color: yellow; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/nested/css-in-less.less: -------------------------------------------------------------------------------- 1 | @import url('./css-in-less.css'); 2 | @import './css-in-less.css'; 3 | 4 | @import './css-in-less-2.less'; 5 | -------------------------------------------------------------------------------- /playground/css/nested/css-in-scss.css: -------------------------------------------------------------------------------- 1 | .css-in-scss { 2 | color: orange; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/nested/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitejs/vite/e0586de502aa82a372039ec6cac50cf69414e6fc/playground/css/nested/icon.png -------------------------------------------------------------------------------- /playground/css/nested/relative.scss: -------------------------------------------------------------------------------- 1 | .sass-at-import-relative { 2 | color: olive; 3 | background: url(./icon.png) 10px no-repeat; 4 | } 5 | -------------------------------------------------------------------------------- /playground/css/nested/root-relative.scss: -------------------------------------------------------------------------------- 1 | .sass-root-relative { 2 | color: orange; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/ok.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitejs/vite/e0586de502aa82a372039ec6cac50cf69414e6fc/playground/css/ok.png -------------------------------------------------------------------------------- /playground/css/options/absolute-import.styl: -------------------------------------------------------------------------------- 1 | .stylus-options-absolute-import 2 | /* imported via vite.config.js */ 3 | color red 4 | -------------------------------------------------------------------------------- /playground/css/options/relative-import.styl: -------------------------------------------------------------------------------- 1 | .stylus-options-relative-import 2 | /* imported via vite.config.js */ 3 | color green 4 | -------------------------------------------------------------------------------- /playground/css/pkg-dep/_index.scss: -------------------------------------------------------------------------------- 1 | .sass-dep { 2 | color: lavender; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/pkg-dep/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitejs/vite/e0586de502aa82a372039ec6cac50cf69414e6fc/playground/css/pkg-dep/index.js -------------------------------------------------------------------------------- /playground/css/pkg-dep/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "dep", 3 | "private": true, 4 | "version": "1.0.0", 5 | "main": "index.js" 6 | } 7 | -------------------------------------------------------------------------------- /playground/css/postcss-caching/blue-app/imported.css: -------------------------------------------------------------------------------- 1 | .postcss-a { 2 | color: pink; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/postcss-caching/green-app/imported.css: -------------------------------------------------------------------------------- 1 | .postcss-b { 2 | color: pink; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/postcss-inject-url.css: -------------------------------------------------------------------------------- 1 | @inject-url; 2 | -------------------------------------------------------------------------------- /playground/css/postcss-source-input.css: -------------------------------------------------------------------------------- 1 | @source-input; 2 | -------------------------------------------------------------------------------- /playground/css/raw-imported.css: -------------------------------------------------------------------------------- 1 | .raw { 2 | /* should not be transformed by postcss */ 3 | &-imported { 4 | color: yellow; 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /playground/css/same-name/sub1/sub.css: -------------------------------------------------------------------------------- 1 | .sub1-sub { 2 | color: red; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/same-name/sub1/sub.js: -------------------------------------------------------------------------------- 1 | import './sub.css' 2 | 3 | export default 'sub1-name' 4 | -------------------------------------------------------------------------------- /playground/css/same-name/sub2/sub.css: -------------------------------------------------------------------------------- 1 | .sub2-sub { 2 | color: blue; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/same-name/sub2/sub.js: -------------------------------------------------------------------------------- 1 | import './sub.css' 2 | 3 | export default 'sub2-name' 4 | -------------------------------------------------------------------------------- /playground/css/sass-modern-compiler-build/entry1.scss: -------------------------------------------------------------------------------- 1 | .entry1 { 2 | color: red; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/sass-modern-compiler-build/entry2.scss: -------------------------------------------------------------------------------- 1 | .entry2 { 2 | color: blue; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/scss-dir/dir/index.scss: -------------------------------------------------------------------------------- 1 | .sass-dir-index { 2 | color: orange; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/scss-dir/main.scss: -------------------------------------------------------------------------------- 1 | @use './dir'; 2 | -------------------------------------------------------------------------------- /playground/css/scss-proxy-dep-nested/index.css: -------------------------------------------------------------------------------- 1 | .scss-proxy-dep { 2 | color: purple; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/scss-proxy-dep-nested/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@vitejs/test-scss-proxy-dep-nested", 3 | "private": true, 4 | "version": "1.0.0" 5 | } 6 | -------------------------------------------------------------------------------- /playground/css/scss-proxy-dep/index.scss: -------------------------------------------------------------------------------- 1 | @use '@vitejs/test-scss-proxy-dep-nested/index.css'; 2 | -------------------------------------------------------------------------------- /playground/css/sugarss.sss: -------------------------------------------------------------------------------- 1 | @import '=/nested/nested.sss' 2 | 3 | .sugarss 4 | color: blue 5 | -------------------------------------------------------------------------------- /playground/css/treeshake-module/a.js: -------------------------------------------------------------------------------- 1 | import style from './a.module.css' 2 | 3 | export function a() { 4 | return style 5 | } 6 | -------------------------------------------------------------------------------- /playground/css/treeshake-module/a.module.css: -------------------------------------------------------------------------------- 1 | .treeshake-module-a { 2 | color: red; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/treeshake-module/b.js: -------------------------------------------------------------------------------- 1 | import style from './b.module.css' 2 | 3 | export function b() { 4 | return style 5 | } 6 | -------------------------------------------------------------------------------- /playground/css/treeshake-module/b.module.css: -------------------------------------------------------------------------------- 1 | .treeshake-module-b { 2 | color: red; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/treeshake-module/index.js: -------------------------------------------------------------------------------- 1 | export { a } from './a.js' 2 | export { b } from './b.js' 3 | -------------------------------------------------------------------------------- /playground/css/treeshake-scoped/a-scoped.css: -------------------------------------------------------------------------------- 1 | .treeshake-scoped-a { 2 | color: red; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/treeshake-scoped/b-scoped.css: -------------------------------------------------------------------------------- 1 | .treeshake-scoped-b { 2 | color: red; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/treeshake-scoped/c-scoped.css: -------------------------------------------------------------------------------- 1 | .treeshake-scoped-c { 2 | color: red; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/treeshake-scoped/d-scoped.css: -------------------------------------------------------------------------------- 1 | .treeshake-scoped-d { 2 | color: red; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/treeshake-scoped/order/a-scoped.css: -------------------------------------------------------------------------------- 1 | .treeshake-scoped-order { 2 | color: red; 3 | background: red; 4 | } 5 | -------------------------------------------------------------------------------- /playground/css/treeshake-scoped/order/after.css: -------------------------------------------------------------------------------- 1 | .treeshake-scoped-order { 2 | color: red; 3 | background: blue; 4 | } 5 | -------------------------------------------------------------------------------- /playground/css/treeshake-scoped/order/before.css: -------------------------------------------------------------------------------- 1 | .treeshake-scoped-order { 2 | color: blue; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/unsupported.css: -------------------------------------------------------------------------------- 1 | .unsupported { 2 | overflow-x: hidden; 3 | } 4 | -------------------------------------------------------------------------------- /playground/css/url-imported.css: -------------------------------------------------------------------------------- 1 | .url { 2 | /* should be transformed by postcss */ 3 | &-imported-css { 4 | color: yellow; 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /playground/css/weapp.wxss: -------------------------------------------------------------------------------- 1 | this is not css 2 | -------------------------------------------------------------------------------- /playground/define/commonjs-dep/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | defined: __STRINGIFIED_OBJ__, 3 | } 4 | -------------------------------------------------------------------------------- /playground/define/commonjs-dep/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@vitejs/test-commonjs-dep", 3 | "private": true, 4 | "version": "1.0.0", 5 | "type": "commonjs" 6 | } 7 | -------------------------------------------------------------------------------- /playground/define/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "foo": "__EXP__" 3 | } 4 | -------------------------------------------------------------------------------- /playground/dynamic-import-inline/index.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /playground/dynamic-import-inline/src/foo.js: -------------------------------------------------------------------------------- 1 | export default function foo() { 2 | return 'foo' 3 | } 4 | -------------------------------------------------------------------------------- /playground/dynamic-import/(app)/main.js: -------------------------------------------------------------------------------- 1 | export function hello() { 2 | return 'dynamic-import-with-vars-contains-parenthesis' 3 | } 4 | -------------------------------------------------------------------------------- /playground/dynamic-import/alias/hello.js: -------------------------------------------------------------------------------- 1 | export function hello() { 2 | return 'hello' 3 | } 4 | console.log('hello.js') 5 | -------------------------------------------------------------------------------- /playground/dynamic-import/alias/hi.js: -------------------------------------------------------------------------------- 1 | export function hi() { 2 | return 'hi' 3 | } 4 | console.log('hi.js') 5 | -------------------------------------------------------------------------------- /playground/dynamic-import/alias/url.js: -------------------------------------------------------------------------------- 1 | export const url = 'load url' 2 | -------------------------------------------------------------------------------- /playground/dynamic-import/alias/worker.js: -------------------------------------------------------------------------------- 1 | self.onmessage = (event) => { 2 | self.postMessage({ 3 | msg: 'load worker', 4 | }) 5 | } 6 | -------------------------------------------------------------------------------- /playground/dynamic-import/css/index.css: -------------------------------------------------------------------------------- 1 | .css { 2 | box-sizing: border-box; 3 | } 4 | .view { 5 | color: red; 6 | } 7 | -------------------------------------------------------------------------------- /playground/dynamic-import/files/mxd.js: -------------------------------------------------------------------------------- 1 | export default function () {} 2 | -------------------------------------------------------------------------------- /playground/dynamic-import/files/mxd.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /playground/dynamic-import/nested/deps.js: -------------------------------------------------------------------------------- 1 | /* don't include dynamic import inside this file */ 2 | 3 | import '@vitejs/test-pkg' 4 | -------------------------------------------------------------------------------- /playground/dynamic-import/nested/hello.js: -------------------------------------------------------------------------------- 1 | export function hello() { 2 | return 'hello' 3 | } 4 | -------------------------------------------------------------------------------- /playground/dynamic-import/nested/nested/self.js: -------------------------------------------------------------------------------- 1 | export const self = 'dynamic-import-nested-self-content' 2 | -------------------------------------------------------------------------------- /playground/dynamic-import/nested/self.js: -------------------------------------------------------------------------------- 1 | export const self = 'dynamic-import-self-content' 2 | -------------------------------------------------------------------------------- /playground/dynamic-import/nested/shared.js: -------------------------------------------------------------------------------- 1 | export const n = 1 2 | -------------------------------------------------------------------------------- /playground/dynamic-import/nested/static.js: -------------------------------------------------------------------------------- 1 | export const self = 'dynamic-import-static' 2 | -------------------------------------------------------------------------------- /playground/dynamic-import/pkg/index.js: -------------------------------------------------------------------------------- 1 | import('./pkg.css') 2 | -------------------------------------------------------------------------------- /playground/dynamic-import/pkg/pkg.css: -------------------------------------------------------------------------------- 1 | .pkg-css { 2 | color: blue; 3 | } 4 | -------------------------------------------------------------------------------- /playground/dynamic-import/views/bar.js: -------------------------------------------------------------------------------- 1 | export const msg = 'Bar view' 2 | -------------------------------------------------------------------------------- /playground/dynamic-import/views/baz.js: -------------------------------------------------------------------------------- 1 | import { n } from '../nested/shared' 2 | console.log('baz' + n) 3 | 4 | export const msg = 'Baz view' 5 | -------------------------------------------------------------------------------- /playground/dynamic-import/views/foo.js: -------------------------------------------------------------------------------- 1 | import { n } from '../nested/shared' 2 | console.log('foo' + n) 3 | 4 | export const msg = 'Foo view' 5 | -------------------------------------------------------------------------------- /playground/dynamic-import/views/qux.js: -------------------------------------------------------------------------------- 1 | export const msg = 'Qux view' 2 | -------------------------------------------------------------------------------- /playground/env-nested/.env: -------------------------------------------------------------------------------- 1 | VITE_PARENT_ENV=dont_load_me -------------------------------------------------------------------------------- /playground/env-nested/envs/.env.development: -------------------------------------------------------------------------------- 1 | VITE_EFFECTIVE_MODE_FILE_NAME=.env.development 2 | -------------------------------------------------------------------------------- /playground/env-nested/envs/.env.production: -------------------------------------------------------------------------------- 1 | VITE_EFFECTIVE_MODE_FILE_NAME=.env.production 2 | -------------------------------------------------------------------------------- /playground/env-nested/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | 3 | export default defineConfig({ 4 | envDir: './envs', 5 | }) 6 | -------------------------------------------------------------------------------- /playground/env/.env.development: -------------------------------------------------------------------------------- 1 | VITE_EFFECTIVE_MODE_FILE_NAME=.env.development 2 | -------------------------------------------------------------------------------- /playground/env/.env.production: -------------------------------------------------------------------------------- 1 | VITE_EFFECTIVE_MODE_FILE_NAME=.env.production 2 | -------------------------------------------------------------------------------- /playground/env/index.js: -------------------------------------------------------------------------------- 1 | text('.url', import.meta.url) 2 | 3 | function text(el, text) { 4 | document.querySelector(el).textContent = text 5 | } 6 | -------------------------------------------------------------------------------- /playground/external/src/main.js: -------------------------------------------------------------------------------- 1 | import '@vitejs/test-dep-that-imports' 2 | import '@vitejs/test-dep-that-requires' 3 | -------------------------------------------------------------------------------- /playground/fs-serve/nested/foo.js: -------------------------------------------------------------------------------- 1 | export const msg = 'foo' 2 | -------------------------------------------------------------------------------- /playground/fs-serve/root/src/.env: -------------------------------------------------------------------------------- 1 | KEY=unsafe 2 | -------------------------------------------------------------------------------- /playground/fs-serve/root/src/code.js: -------------------------------------------------------------------------------- 1 | // code.js 2 | -------------------------------------------------------------------------------- /playground/fs-serve/root/src/deny/.deny: -------------------------------------------------------------------------------- 1 | .deny 2 | -------------------------------------------------------------------------------- /playground/fs-serve/root/src/deny/deny.txt: -------------------------------------------------------------------------------- 1 | deny 2 | -------------------------------------------------------------------------------- /playground/fs-serve/root/src/dummy.crt: -------------------------------------------------------------------------------- 1 | secret 2 | -------------------------------------------------------------------------------- /playground/fs-serve/root/src/safe.txt: -------------------------------------------------------------------------------- 1 | KEY=safe 2 | -------------------------------------------------------------------------------- /playground/fs-serve/root/src/special characters åäö/safe.json: -------------------------------------------------------------------------------- 1 | { 2 | "msg": "safe" 3 | } 4 | -------------------------------------------------------------------------------- /playground/fs-serve/root/src/special characters åäö/safe.txt: -------------------------------------------------------------------------------- 1 | KEY=safe 2 | -------------------------------------------------------------------------------- /playground/fs-serve/root/src/subdir/safe.txt: -------------------------------------------------------------------------------- 1 | KEY=safe 2 | -------------------------------------------------------------------------------- /playground/fs-serve/root/unsafe.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /playground/fs-serve/root/unsafe.txt: -------------------------------------------------------------------------------- 1 | KEY=unsafe 2 | -------------------------------------------------------------------------------- /playground/fs-serve/safe.json: -------------------------------------------------------------------------------- 1 | { 2 | "msg": "safe" 3 | } 4 | -------------------------------------------------------------------------------- /playground/fs-serve/unsafe.json: -------------------------------------------------------------------------------- 1 | { 2 | "msg": "unsafe" 3 | } 4 | -------------------------------------------------------------------------------- /playground/glob-import/dir/alias.js: -------------------------------------------------------------------------------- 1 | export default 'hi' 2 | -------------------------------------------------------------------------------- /playground/glob-import/dir/baz.json: -------------------------------------------------------------------------------- 1 | { 2 | "msg": "baz" 3 | } 4 | -------------------------------------------------------------------------------- /playground/glob-import/dir/foo.css: -------------------------------------------------------------------------------- 1 | .foo { 2 | color: blue; 3 | } 4 | -------------------------------------------------------------------------------- /playground/glob-import/dir/foo.js: -------------------------------------------------------------------------------- 1 | export const msg = 'foo' 2 | -------------------------------------------------------------------------------- /playground/glob-import/dir/nested/bar.js: -------------------------------------------------------------------------------- 1 | const modules = import.meta.glob('../*.json', { eager: true }) 2 | 3 | export const msg = 'bar' 4 | export { modules } 5 | -------------------------------------------------------------------------------- /playground/glob-import/dir/node_modules/hoge.js: -------------------------------------------------------------------------------- 1 | export const msg = 'hoge' 2 | -------------------------------------------------------------------------------- /playground/glob-import/dir/quote'.js: -------------------------------------------------------------------------------- 1 | export const msg = 'single-quote' 2 | -------------------------------------------------------------------------------- /playground/glob-import/escape/(parenthesis)/mod/index.js: -------------------------------------------------------------------------------- 1 | export const msg = 'foo' 2 | -------------------------------------------------------------------------------- /playground/glob-import/escape/[brackets]/mod/index.js: -------------------------------------------------------------------------------- 1 | export const msg = 'foo' 2 | -------------------------------------------------------------------------------- /playground/glob-import/escape/{curlies}/mod/index.js: -------------------------------------------------------------------------------- 1 | export const msg = 'foo' 2 | -------------------------------------------------------------------------------- /playground/glob-import/import-meta-glob-pkg/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@vitejs/test-import-meta-glob-pkg", 3 | "type": "module", 4 | "main": "./index.js" 5 | } 6 | -------------------------------------------------------------------------------- /playground/glob-import/imports-path/bar.js: -------------------------------------------------------------------------------- 1 | export default 'bar' 2 | -------------------------------------------------------------------------------- /playground/glob-import/imports-path/foo.js: -------------------------------------------------------------------------------- 1 | export default 'foo' 2 | -------------------------------------------------------------------------------- /playground/glob-import/no-tree-shake.css: -------------------------------------------------------------------------------- 1 | .no-tree-shake-eager-css { 2 | color: orange; 3 | } 4 | -------------------------------------------------------------------------------- /playground/glob-import/pkg-pages/foo.js: -------------------------------------------------------------------------------- 1 | // empty 2 | -------------------------------------------------------------------------------- /playground/glob-import/tree-shake.css: -------------------------------------------------------------------------------- 1 | .tree-shake-eager-css { 2 | color: orange; 3 | } 4 | -------------------------------------------------------------------------------- /playground/hmr-root/foo.js: -------------------------------------------------------------------------------- 1 | export const foo = 'foo' 2 | -------------------------------------------------------------------------------- /playground/hmr-ssr/accept-exports/dynamic-imports/index.ts: -------------------------------------------------------------------------------- 1 | import './dynamic-imports.ts' 2 | -------------------------------------------------------------------------------- /playground/hmr-ssr/accept-exports/export-from/depA.ts: -------------------------------------------------------------------------------- 1 | export const a = 'Ax' 2 | -------------------------------------------------------------------------------- /playground/hmr-ssr/accept-exports/export-from/hub.ts: -------------------------------------------------------------------------------- 1 | export * from './depA' 2 | -------------------------------------------------------------------------------- /playground/hmr-ssr/accept-exports/export-from/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | -------------------------------------------------------------------------------- /playground/hmr-ssr/accept-exports/main-accepted/dep.ts: -------------------------------------------------------------------------------- 1 | export default 'dep0' 2 | -------------------------------------------------------------------------------- /playground/hmr-ssr/accept-exports/main-accepted/index.ts: -------------------------------------------------------------------------------- 1 | import './main-accepted' 2 | -------------------------------------------------------------------------------- /playground/hmr-ssr/accept-exports/main-non-accepted/dep.ts: -------------------------------------------------------------------------------- 1 | export default 'dep0' 2 | -------------------------------------------------------------------------------- /playground/hmr-ssr/accept-exports/main-non-accepted/index.ts: -------------------------------------------------------------------------------- 1 | import './main-non-accepted.ts' 2 | -------------------------------------------------------------------------------- /playground/hmr-ssr/accept-exports/main-non-accepted/main-non-accepted.ts: -------------------------------------------------------------------------------- 1 | import { a } from './named' 2 | import def from './default' 3 | 4 | log(`>>>>>> ${a} ${def}`) 5 | -------------------------------------------------------------------------------- /playground/hmr-ssr/accept-exports/reexports.bak/index.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /playground/hmr-ssr/accept-exports/reexports.bak/reexports.ts: -------------------------------------------------------------------------------- 1 | import { a } from './accept-named' 2 | 3 | log('accept-named:' + a) 4 | 5 | log('>>> ready') 6 | -------------------------------------------------------------------------------- /playground/hmr-ssr/accept-exports/reexports.bak/source.ts: -------------------------------------------------------------------------------- 1 | export const a = 'a0' 2 | export const b = 'b0' 3 | -------------------------------------------------------------------------------- /playground/hmr-ssr/accept-exports/side-effects/index.ts: -------------------------------------------------------------------------------- 1 | import './side-effects.ts' 2 | -------------------------------------------------------------------------------- /playground/hmr-ssr/accept-exports/star-imports/index.ts: -------------------------------------------------------------------------------- 1 | import './star-imports.ts' 2 | -------------------------------------------------------------------------------- /playground/hmr-ssr/accept-exports/unused-exports/index.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /playground/hmr-ssr/accept-exports/unused-exports/index.ts: -------------------------------------------------------------------------------- 1 | import './unused' 2 | import { foo } from './used' 3 | 4 | log('used:' + foo) 5 | -------------------------------------------------------------------------------- /playground/hmr-ssr/circular/mod-a.js: -------------------------------------------------------------------------------- 1 | export const value = 'mod-a' 2 | 3 | import { value as _value } from './mod-b' 4 | 5 | export const msg = `mod-a -> ${_value}` 6 | -------------------------------------------------------------------------------- /playground/hmr-ssr/circular/mod-b.js: -------------------------------------------------------------------------------- 1 | import { value as _value } from './mod-c' 2 | 3 | export const value = `mod-b -> ${_value}` 4 | -------------------------------------------------------------------------------- /playground/hmr-ssr/counter/dep.ts: -------------------------------------------------------------------------------- 1 | // This file is never loaded 2 | if (import.meta.hot) { 3 | import.meta.hot.accept(() => {}) 4 | } 5 | -------------------------------------------------------------------------------- /playground/hmr-ssr/customFile.js: -------------------------------------------------------------------------------- 1 | export const msg = 'custom' 2 | -------------------------------------------------------------------------------- /playground/hmr-ssr/hmrNestedDep.js: -------------------------------------------------------------------------------- 1 | export const foo = 1 2 | -------------------------------------------------------------------------------- /playground/hmr-ssr/importedVirtual.js: -------------------------------------------------------------------------------- 1 | export const virtual = '[success]' 2 | -------------------------------------------------------------------------------- /playground/hmr-ssr/importing-updated/index.js: -------------------------------------------------------------------------------- 1 | import './a' 2 | import './b' 3 | -------------------------------------------------------------------------------- /playground/hmr-ssr/intermediate-file-delete/display.js: -------------------------------------------------------------------------------- 1 | export const displayCount = (count) => `count is ${count}` 2 | -------------------------------------------------------------------------------- /playground/hmr-ssr/intermediate-file-delete/re-export.js: -------------------------------------------------------------------------------- 1 | export * from './display.js' 2 | -------------------------------------------------------------------------------- /playground/hmr-ssr/invalidation-circular-deps/index.js: -------------------------------------------------------------------------------- 1 | import './circular-invalidate/parent' 2 | import './invalidate-handled-in-circle/parent' 3 | -------------------------------------------------------------------------------- /playground/hmr-ssr/missing-import/a.js: -------------------------------------------------------------------------------- 1 | import 'missing-modules' 2 | 3 | log('missing test') 4 | -------------------------------------------------------------------------------- /playground/hmr-ssr/missing-import/index.js: -------------------------------------------------------------------------------- 1 | import './main.js' 2 | -------------------------------------------------------------------------------- /playground/hmr-ssr/missing-import/main.js: -------------------------------------------------------------------------------- 1 | import './a.js' 2 | -------------------------------------------------------------------------------- /playground/hmr-ssr/non-tested/dep.js: -------------------------------------------------------------------------------- 1 | export const test = 'true' 2 | 3 | import.meta.hot.accept() 4 | -------------------------------------------------------------------------------- /playground/hmr-ssr/optional-chaining/child.js: -------------------------------------------------------------------------------- 1 | export const foo = 1 2 | -------------------------------------------------------------------------------- /playground/hmr-ssr/queries/multi-query.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitejs/vite/e0586de502aa82a372039ec6cac50cf69414e6fc/playground/hmr-ssr/queries/multi-query.js -------------------------------------------------------------------------------- /playground/hmr-ssr/self-accept-within-circular/a.js: -------------------------------------------------------------------------------- 1 | import { b } from './b' 2 | 3 | export const a = { 4 | b, 5 | } 6 | -------------------------------------------------------------------------------- /playground/hmr-ssr/self-accept-within-circular/b.js: -------------------------------------------------------------------------------- 1 | import { c } from './c' 2 | 3 | const b = { 4 | c, 5 | } 6 | 7 | export { b } 8 | -------------------------------------------------------------------------------- /playground/hmr-ssr/self-accept-within-circular/index.js: -------------------------------------------------------------------------------- 1 | import { a } from './a' 2 | 3 | log(a) 4 | -------------------------------------------------------------------------------- /playground/hmr-ssr/soft-invalidation/child.js: -------------------------------------------------------------------------------- 1 | export const foo = 'bar' 2 | -------------------------------------------------------------------------------- /playground/hmr/accept-exports/dynamic-imports/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | -------------------------------------------------------------------------------- /playground/hmr/accept-exports/export-from/depA.ts: -------------------------------------------------------------------------------- 1 | export const a = 'Ax' 2 | -------------------------------------------------------------------------------- /playground/hmr/accept-exports/export-from/hub.ts: -------------------------------------------------------------------------------- 1 | export * from './depA' 2 | -------------------------------------------------------------------------------- /playground/hmr/accept-exports/export-from/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | -------------------------------------------------------------------------------- /playground/hmr/accept-exports/main-accepted/dep.ts: -------------------------------------------------------------------------------- 1 | export default 'dep0' 2 | -------------------------------------------------------------------------------- /playground/hmr/accept-exports/main-accepted/index.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /playground/hmr/accept-exports/main-non-accepted/dep.ts: -------------------------------------------------------------------------------- 1 | export default 'dep0' 2 | -------------------------------------------------------------------------------- /playground/hmr/accept-exports/main-non-accepted/index.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /playground/hmr/accept-exports/main-non-accepted/main-non-accepted.ts: -------------------------------------------------------------------------------- 1 | import { a } from './named' 2 | import def from './default' 3 | 4 | console.log(`>>>>>> ${a} ${def}`) 5 | -------------------------------------------------------------------------------- /playground/hmr/accept-exports/reexports.bak/index.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /playground/hmr/accept-exports/reexports.bak/reexports.ts: -------------------------------------------------------------------------------- 1 | import { a } from './accept-named' 2 | 3 | console.log('accept-named:' + a) 4 | 5 | console.log('>>> ready') 6 | -------------------------------------------------------------------------------- /playground/hmr/accept-exports/reexports.bak/source.ts: -------------------------------------------------------------------------------- 1 | export const a = 'a0' 2 | export const b = 'b0' 3 | -------------------------------------------------------------------------------- /playground/hmr/accept-exports/side-effects/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | -------------------------------------------------------------------------------- /playground/hmr/accept-exports/star-imports/index.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /playground/hmr/accept-exports/unused-exports/index.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /playground/hmr/accept-exports/unused-exports/index.ts: -------------------------------------------------------------------------------- 1 | import './unused' 2 | import { foo } from './used' 3 | 4 | console.log('used:' + foo) 5 | -------------------------------------------------------------------------------- /playground/hmr/circular/mod-a.js: -------------------------------------------------------------------------------- 1 | export const value = 'mod-a' 2 | 3 | import { value as _value } from './mod-b' 4 | 5 | export const msg = `mod-a -> ${_value}` 6 | -------------------------------------------------------------------------------- /playground/hmr/circular/mod-b.js: -------------------------------------------------------------------------------- 1 | import { value as _value } from './mod-c' 2 | 3 | export const value = `mod-b -> ${_value}` 4 | -------------------------------------------------------------------------------- /playground/hmr/counter/dep.ts: -------------------------------------------------------------------------------- 1 | // This file is never loaded 2 | if (import.meta.hot) { 3 | import.meta.hot.accept(() => {}) 4 | } 5 | -------------------------------------------------------------------------------- /playground/hmr/counter/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /playground/hmr/css-deps/main.css: -------------------------------------------------------------------------------- 1 | .css-deps { 2 | color: replaced; 3 | } 4 | -------------------------------------------------------------------------------- /playground/hmr/customFile.js: -------------------------------------------------------------------------------- 1 | export const msg = 'custom' 2 | -------------------------------------------------------------------------------- /playground/hmr/global.css: -------------------------------------------------------------------------------- 1 | body { 2 | background: white; 3 | } 4 | -------------------------------------------------------------------------------- /playground/hmr/hmrNestedDep.js: -------------------------------------------------------------------------------- 1 | export const foo = 1 2 | -------------------------------------------------------------------------------- /playground/hmr/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitejs/vite/e0586de502aa82a372039ec6cac50cf69414e6fc/playground/hmr/icon.png -------------------------------------------------------------------------------- /playground/hmr/importedVirtual.js: -------------------------------------------------------------------------------- 1 | export const virtual = '[success]' 2 | -------------------------------------------------------------------------------- /playground/hmr/importing-updated/index.js: -------------------------------------------------------------------------------- 1 | import './a' 2 | import './b' 3 | -------------------------------------------------------------------------------- /playground/hmr/intermediate-file-delete/display.js: -------------------------------------------------------------------------------- 1 | export const displayCount = (count) => `count is ${count}` 2 | -------------------------------------------------------------------------------- /playground/hmr/intermediate-file-delete/re-export.js: -------------------------------------------------------------------------------- 1 | export * from './display.js' 2 | -------------------------------------------------------------------------------- /playground/hmr/invalidation-circular-deps/index.js: -------------------------------------------------------------------------------- 1 | import './circular-invalidate/parent' 2 | import './invalidate-handled-in-circle/parent' 3 | -------------------------------------------------------------------------------- /playground/hmr/missing-file/index.html: -------------------------------------------------------------------------------- 1 |
Page
2 | 3 | -------------------------------------------------------------------------------- /playground/hmr/missing-file/main.js: -------------------------------------------------------------------------------- 1 | import './a.js' 2 | -------------------------------------------------------------------------------- /playground/hmr/missing-import/a.js: -------------------------------------------------------------------------------- 1 | import 'missing-modules' 2 | 3 | console.log('missing test') 4 | -------------------------------------------------------------------------------- /playground/hmr/missing-import/index.html: -------------------------------------------------------------------------------- 1 |
Page
2 | 3 | -------------------------------------------------------------------------------- /playground/hmr/missing-import/main.js: -------------------------------------------------------------------------------- 1 | import './a.js' 2 | -------------------------------------------------------------------------------- /playground/hmr/optional-chaining/child.js: -------------------------------------------------------------------------------- 1 | export const foo = 1 2 | -------------------------------------------------------------------------------- /playground/hmr/self-accept-within-circular/a.js: -------------------------------------------------------------------------------- 1 | import { b } from './b' 2 | 3 | export const a = { 4 | b, 5 | } 6 | -------------------------------------------------------------------------------- /playground/hmr/self-accept-within-circular/b.js: -------------------------------------------------------------------------------- 1 | import { c } from './c' 2 | 3 | const b = { 4 | c, 5 | } 6 | 7 | export { b } 8 | -------------------------------------------------------------------------------- /playground/hmr/self-accept-within-circular/index.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | -------------------------------------------------------------------------------- /playground/hmr/self-accept-within-circular/index.js: -------------------------------------------------------------------------------- 1 | import { a } from './a' 2 | 3 | console.log(a) 4 | -------------------------------------------------------------------------------- /playground/hmr/soft-invalidation/child.js: -------------------------------------------------------------------------------- 1 | export const foo = 'bar' 2 | -------------------------------------------------------------------------------- /playground/hmr/unicode-path/中文-にほんご-한글-🌕🌖🌗/index.html: -------------------------------------------------------------------------------- 1 |
title
2 | -------------------------------------------------------------------------------- /playground/html/.env: -------------------------------------------------------------------------------- 1 | VITE_FOO=bar 2 | VITE_FAVICON_URL=/sprite.svg 3 | -------------------------------------------------------------------------------- /playground/html/a á.html: -------------------------------------------------------------------------------- 1 |

Special Character

2 | 3 | 6 | -------------------------------------------------------------------------------- /playground/html/common.css: -------------------------------------------------------------------------------- 1 | p { 2 | color: grey; 3 | } 4 | -------------------------------------------------------------------------------- /playground/html/inline/dep1.js: -------------------------------------------------------------------------------- 1 | import { log } from './common' 2 | 3 | log('dep1') 4 | -------------------------------------------------------------------------------- /playground/html/inline/dep2.js: -------------------------------------------------------------------------------- 1 | import { log } from './common' 2 | 3 | log('dep2') 4 | -------------------------------------------------------------------------------- /playground/html/inline/dep3.js: -------------------------------------------------------------------------------- 1 | import './dep2' 2 | import { log } from './common' 3 | 4 | log('dep3') 5 | -------------------------------------------------------------------------------- /playground/html/inline/shared-1.html: -------------------------------------------------------------------------------- 1 |

2 | 
3 | 


--------------------------------------------------------------------------------
/playground/html/inline/shared-2.html:
--------------------------------------------------------------------------------
1 | 

2 | 
3 | 


--------------------------------------------------------------------------------
/playground/html/inline/shared.js:
--------------------------------------------------------------------------------
1 | import './dep3'
2 | import { log } from './common'
3 | 
4 | log('shared')
5 | 


--------------------------------------------------------------------------------
/playground/html/inline/shared_a.html:
--------------------------------------------------------------------------------
1 | 

inline a

2 | -------------------------------------------------------------------------------- /playground/html/inline/unique.html: -------------------------------------------------------------------------------- 1 |

2 | 
3 | 


--------------------------------------------------------------------------------
/playground/html/inline/unique.js:
--------------------------------------------------------------------------------
1 | import { log } from './common'
2 | import './dep2'
3 | 
4 | log('unique')
5 | 


--------------------------------------------------------------------------------
/playground/html/invalid.html:
--------------------------------------------------------------------------------
1 | 
2 | -------------------------------------------------------------------------------- /playground/html/link-props/print.css: -------------------------------------------------------------------------------- 1 | #link-props { 2 | color: green; 3 | } 4 | -------------------------------------------------------------------------------- /playground/html/link-props/screen.css: -------------------------------------------------------------------------------- 1 | #link-props { 2 | color: red; 3 | } 4 | -------------------------------------------------------------------------------- /playground/html/main.css: -------------------------------------------------------------------------------- 1 | h1 { 2 | color: blue; 3 | } 4 | -------------------------------------------------------------------------------- /playground/html/main.js: -------------------------------------------------------------------------------- 1 | import { msg } from './shared' 2 | import './common.css' 3 | 4 | console.log(msg + ' from main') 5 | -------------------------------------------------------------------------------- /playground/html/nested/asset/main.js: -------------------------------------------------------------------------------- 1 | function text(el, text) { 2 | document.querySelector(el).textContent = text 3 | } 4 | text('.relative-js', 'hello') 5 | -------------------------------------------------------------------------------- /playground/html/nested/asset/style.css: -------------------------------------------------------------------------------- 1 | .relative-css { 2 | color: red; 3 | } 4 | -------------------------------------------------------------------------------- /playground/html/nested/nested.css: -------------------------------------------------------------------------------- 1 | h1 { 2 | color: red; 3 | } 4 | -------------------------------------------------------------------------------- /playground/html/nested/nested.js: -------------------------------------------------------------------------------- 1 | import { msg } from '../shared' 2 | import '../common.css' 3 | 4 | console.log(msg + ' from nested') 5 | -------------------------------------------------------------------------------- /playground/html/relative-input.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |

4 | -------------------------------------------------------------------------------- /playground/html/relative-input/main.js: -------------------------------------------------------------------------------- 1 | document.querySelector('.relative-input').textContent = 'OK' 2 | -------------------------------------------------------------------------------- /playground/html/serve/both.html: -------------------------------------------------------------------------------- 1 |

both.html

2 | -------------------------------------------------------------------------------- /playground/html/serve/both/index.html: -------------------------------------------------------------------------------- 1 |

both/index.html

2 | -------------------------------------------------------------------------------- /playground/html/serve/file.html: -------------------------------------------------------------------------------- 1 |

file.html

2 | -------------------------------------------------------------------------------- /playground/html/serve/folder/index.html: -------------------------------------------------------------------------------- 1 |

folder/index.html

2 | -------------------------------------------------------------------------------- /playground/html/shared.js: -------------------------------------------------------------------------------- 1 | export const msg = 'shared' 2 | -------------------------------------------------------------------------------- /playground/html/side-effects/index.html: -------------------------------------------------------------------------------- 1 |

sideEffects false

2 | 3 | -------------------------------------------------------------------------------- /playground/html/side-effects/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@vitejs/test-html-side-effects", 3 | "private": true, 4 | "version": "0.0.0", 5 | "sideEffects": false 6 | } 7 | -------------------------------------------------------------------------------- /playground/html/side-effects/sideEffects.js: -------------------------------------------------------------------------------- 1 | console.log('message from sideEffects script') 2 | -------------------------------------------------------------------------------- /playground/html/unicode-path/中文-にほんご-한글-🌕🌖🌗/index.html: -------------------------------------------------------------------------------- 1 |

Unicode path

2 | -------------------------------------------------------------------------------- /playground/html/valid.js: -------------------------------------------------------------------------------- 1 | document.getElementById(`no-quotes-on-attr`).innerHTML = 2 | `No quotes on Attr working` 3 | -------------------------------------------------------------------------------- /playground/html/warmup/warm.js: -------------------------------------------------------------------------------- 1 | console.log('From warm.js') 2 | -------------------------------------------------------------------------------- /playground/html/write.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | -------------------------------------------------------------------------------- /playground/import-assertion/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "foo": "bar" 3 | } 4 | -------------------------------------------------------------------------------- /playground/import-assertion/import-assertion-dep/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "hello": "world" 3 | } 4 | -------------------------------------------------------------------------------- /playground/import-assertion/import-assertion-dep/index.js: -------------------------------------------------------------------------------- 1 | import json from './data.json' assert { type: 'json' } 2 | 3 | export const hello = json.hello 4 | -------------------------------------------------------------------------------- /playground/js-sourcemap/after-preload-dynamic-no-dep.js: -------------------------------------------------------------------------------- 1 | import('./dynamic/dynamic-no-dep') 2 | 3 | console.log('after preload dynamic no dep') 4 | -------------------------------------------------------------------------------- /playground/js-sourcemap/after-preload-dynamic.js: -------------------------------------------------------------------------------- 1 | import('./dynamic/dynamic-foo') 2 | 3 | console.log('after preload dynamic') 4 | -------------------------------------------------------------------------------- /playground/js-sourcemap/bar.ts: -------------------------------------------------------------------------------- 1 | export const bar = 'bar' 2 | -------------------------------------------------------------------------------- /playground/js-sourcemap/dynamic/dynamic-foo.css: -------------------------------------------------------------------------------- 1 | .dynamic-foo { 2 | color: red; 3 | } 4 | -------------------------------------------------------------------------------- /playground/js-sourcemap/dynamic/dynamic-foo.js: -------------------------------------------------------------------------------- 1 | import './dynamic-foo.css' 2 | 3 | console.log('dynamic/dynamic-foo') 4 | -------------------------------------------------------------------------------- /playground/js-sourcemap/dynamic/dynamic-no-dep.js: -------------------------------------------------------------------------------- 1 | console.log('dynamic/dynamic-no-dep') 2 | -------------------------------------------------------------------------------- /playground/js-sourcemap/foo-with-sourcemap.js: -------------------------------------------------------------------------------- 1 | export const foo = 'foo' 2 | -------------------------------------------------------------------------------- /playground/js-sourcemap/foo.js: -------------------------------------------------------------------------------- 1 | export const foo = 'foo' 2 | -------------------------------------------------------------------------------- /playground/js-sourcemap/importee-pkg/index.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line import-x/no-commonjs 2 | exports.foo = 'foo' 3 | -------------------------------------------------------------------------------- /playground/js-sourcemap/plugin-foo.js: -------------------------------------------------------------------------------- 1 | export const foo = 'foo' 2 | -------------------------------------------------------------------------------- /playground/js-sourcemap/zoo.js: -------------------------------------------------------------------------------- 1 | export const zoo = 'zoo' 2 | -------------------------------------------------------------------------------- /playground/json/hmr.json: -------------------------------------------------------------------------------- 1 | { 2 | "hmr": "this is hmr json" 3 | } 4 | -------------------------------------------------------------------------------- /playground/json/json-module/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "hello": "hi" 3 | } 4 | -------------------------------------------------------------------------------- /playground/json/json-module/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@vitejs/test-json-module", 3 | "version": "0.0.0" 4 | } 5 | -------------------------------------------------------------------------------- /playground/json/public/public.json: -------------------------------------------------------------------------------- 1 | { 2 | "hello": "this is json" 3 | } 4 | -------------------------------------------------------------------------------- /playground/json/test.json: -------------------------------------------------------------------------------- 1 | { 2 | "hello": "this is json" 3 | } 4 | -------------------------------------------------------------------------------- /playground/legacy/async.js: -------------------------------------------------------------------------------- 1 | export function fn() { 2 | const m = new Map() 3 | m.set('foo', 'Hello') 4 | document.querySelector('#app').textContent = m.get('foo') 5 | } 6 | -------------------------------------------------------------------------------- /playground/legacy/custom0.js: -------------------------------------------------------------------------------- 1 | export const foo = 'bar' 2 | -------------------------------------------------------------------------------- /playground/legacy/custom1.js: -------------------------------------------------------------------------------- 1 | export const foo = 'bar' 2 | -------------------------------------------------------------------------------- /playground/legacy/custom2.js: -------------------------------------------------------------------------------- 1 | export const foo = 'bar' 2 | -------------------------------------------------------------------------------- /playground/legacy/dynamic.css: -------------------------------------------------------------------------------- 1 | #dynamic-css { 2 | color: red; 3 | } 4 | -------------------------------------------------------------------------------- /playground/legacy/module.js: -------------------------------------------------------------------------------- 1 | export const module = 'module' 2 | -------------------------------------------------------------------------------- /playground/legacy/nested/index.html: -------------------------------------------------------------------------------- 1 |

2 | 3 | -------------------------------------------------------------------------------- /playground/legacy/no-polyfills-no-systemjs.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | -------------------------------------------------------------------------------- /playground/legacy/no-polyfills-no-systemjs.js: -------------------------------------------------------------------------------- 1 | document.querySelector('main').innerHTML = '👋' 2 | -------------------------------------------------------------------------------- /playground/legacy/no-polyfills.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | -------------------------------------------------------------------------------- /playground/legacy/no-polyfills.js: -------------------------------------------------------------------------------- 1 | document.querySelector('main').innerHTML = '👋' 2 | -------------------------------------------------------------------------------- /playground/legacy/style-only-entry.css: -------------------------------------------------------------------------------- 1 | :root { 2 | background: #ff69b4; 3 | } 4 | -------------------------------------------------------------------------------- /playground/legacy/style.css: -------------------------------------------------------------------------------- 1 | #app { 2 | color: red; 3 | } 4 | -------------------------------------------------------------------------------- /playground/legacy/worker.js: -------------------------------------------------------------------------------- 1 | import { module } from './module' 2 | 3 | self.onmessage = () => { 4 | self.postMessage(module) 5 | } 6 | -------------------------------------------------------------------------------- /playground/lib/src/css-entry-1.js: -------------------------------------------------------------------------------- 1 | import './entry-1.css' 2 | 3 | export default 'css-entry-1' 4 | -------------------------------------------------------------------------------- /playground/lib/src/css-entry-2.js: -------------------------------------------------------------------------------- 1 | import './entry-2.css' 2 | 3 | export default 'css-entry-2' 4 | -------------------------------------------------------------------------------- /playground/lib/src/dynamic.css: -------------------------------------------------------------------------------- 1 | @import 'https://cdn.jsdelivr.net/npm/@mdi/font@5.9.55/css/materialdesignicons.min.css'; 2 | .dynamic { 3 | color: red; 4 | } 5 | -------------------------------------------------------------------------------- /playground/lib/src/entry-1.css: -------------------------------------------------------------------------------- 1 | h1 { 2 | content: 'entry-1.css'; 3 | } 4 | -------------------------------------------------------------------------------- /playground/lib/src/entry-2.css: -------------------------------------------------------------------------------- 1 | h2 { 2 | content: 'entry-2.css'; 3 | } 4 | -------------------------------------------------------------------------------- /playground/lib/src/index.css: -------------------------------------------------------------------------------- 1 | .index { 2 | color: blue; 3 | } 4 | -------------------------------------------------------------------------------- /playground/lib/src/main-named.js: -------------------------------------------------------------------------------- 1 | export const foo = 'foo' 2 | 3 | // Force esbuild spread helpers 4 | console.log({ ...foo }) 5 | -------------------------------------------------------------------------------- /playground/lib/src/message.js: -------------------------------------------------------------------------------- 1 | export default 'hello vite' 2 | -------------------------------------------------------------------------------- /playground/minify/dir/module/index.css: -------------------------------------------------------------------------------- 1 | /*! explicit comment */ 2 | h2 { 3 | color: #ff00ff; 4 | } 5 | -------------------------------------------------------------------------------- /playground/minify/dir/module/index.js: -------------------------------------------------------------------------------- 1 | /*! explicit comment */ 2 | export const msg = `[success] minified module` 3 | -------------------------------------------------------------------------------- /playground/minify/dir/module/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@vitejs/test-minify", 3 | "private": true, 4 | "type": "module", 5 | "version": "0.0.0" 6 | } 7 | -------------------------------------------------------------------------------- /playground/minify/index.html: -------------------------------------------------------------------------------- 1 |

Minify

2 | 3 | 4 | -------------------------------------------------------------------------------- /playground/minify/test.css: -------------------------------------------------------------------------------- 1 | @import 'minified-module/index.css'; 2 | 3 | h1 { 4 | /* do not minify as red text */ 5 | color: #ff0000; 6 | } 7 | -------------------------------------------------------------------------------- /playground/module-graph/empty.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitejs/vite/e0586de502aa82a372039ec6cac50cf69414e6fc/playground/module-graph/empty.js -------------------------------------------------------------------------------- /playground/multiple-entrypoints/dynamic-a.js: -------------------------------------------------------------------------------- 1 | import './reference' 2 | -------------------------------------------------------------------------------- /playground/multiple-entrypoints/dynamic-b.js: -------------------------------------------------------------------------------- 1 | import './reference' 2 | -------------------------------------------------------------------------------- /playground/multiple-entrypoints/reference.js: -------------------------------------------------------------------------------- 1 | import './reference.scss' 2 | 3 | document.querySelector('.content').textContent = 'Reference' 4 | -------------------------------------------------------------------------------- /playground/multiple-entrypoints/reference.scss: -------------------------------------------------------------------------------- 1 | .content { 2 | color: red; 3 | } 4 | -------------------------------------------------------------------------------- /playground/nested-deps/test-package-a/index.js: -------------------------------------------------------------------------------- 1 | export default 'A@2.0.0' 2 | -------------------------------------------------------------------------------- /playground/nested-deps/test-package-b/index.js: -------------------------------------------------------------------------------- 1 | export { default as A } from 'test-package-a' 2 | 3 | export default 'B@1.0.0' 4 | -------------------------------------------------------------------------------- /playground/nested-deps/test-package-b/node_modules/test-package-a/index.js: -------------------------------------------------------------------------------- 1 | export default 'A@1.0.0' 2 | -------------------------------------------------------------------------------- /playground/nested-deps/test-package-b/node_modules/test-package-a/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "test-package-a", 3 | "version": "1.0.0", 4 | "main": "index.js" 5 | } 6 | -------------------------------------------------------------------------------- /playground/nested-deps/test-package-c/index-es.js: -------------------------------------------------------------------------------- 1 | export default 'es-C@1.0.0' 2 | -------------------------------------------------------------------------------- /playground/nested-deps/test-package-c/index.js: -------------------------------------------------------------------------------- 1 | // this module should not be resolved 2 | export default 'C@1.0.0' 3 | -------------------------------------------------------------------------------- /playground/nested-deps/test-package-c/side.js: -------------------------------------------------------------------------------- 1 | export { default as C } from '@vitejs/test-package-c' 2 | -------------------------------------------------------------------------------- /playground/nested-deps/test-package-d/index.js: -------------------------------------------------------------------------------- 1 | export { default as nestedD } from '@vitejs/test-package-d-nested' 2 | 3 | export default 'D@1.0.0' 4 | -------------------------------------------------------------------------------- /playground/nested-deps/test-package-d/test-package-d-nested/index.js: -------------------------------------------------------------------------------- 1 | export default 'D-nested@1.0.0' 2 | -------------------------------------------------------------------------------- /playground/nested-deps/test-package-f/index.js: -------------------------------------------------------------------------------- 1 | export default 'F@2.0.0' 2 | -------------------------------------------------------------------------------- /playground/object-hooks/index.html: -------------------------------------------------------------------------------- 1 |

Transform Hook order

2 |
3 | 4 | 5 | -------------------------------------------------------------------------------- /playground/object-hooks/main.ts: -------------------------------------------------------------------------------- 1 | const app = document.getElementById('transform') 2 | app.innerText = '__TRANSFORM__' 3 | -------------------------------------------------------------------------------- /playground/optimize-deps-no-discovery/dep-no-discovery/index.js: -------------------------------------------------------------------------------- 1 | // written in cjs, optimization should convert this to esm 2 | module.exports = '[success]' 3 | -------------------------------------------------------------------------------- /playground/optimize-deps/.hidden-dir/foo.js: -------------------------------------------------------------------------------- 1 | export const greeting = 'hello!' 2 | -------------------------------------------------------------------------------- /playground/optimize-deps/added-in-entries/index.js: -------------------------------------------------------------------------------- 1 | // written in cjs, optimization should convert this to esm 2 | module.exports = 'added-in-entries' 3 | -------------------------------------------------------------------------------- /playground/optimize-deps/dep-cjs-browser-field-bare/events-shim.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | foo: 'foo', 3 | } 4 | -------------------------------------------------------------------------------- /playground/optimize-deps/dep-cjs-browser-field-bare/index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const internal = require('./internal') 4 | 5 | module.exports = internal 6 | -------------------------------------------------------------------------------- /playground/optimize-deps/dep-cjs-compiled-from-cjs/index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | function foo() { 3 | return 'foo' 4 | } 5 | module.exports = foo 6 | -------------------------------------------------------------------------------- /playground/optimize-deps/dep-cjs-external-package-omit-js-suffix/test.astro.js: -------------------------------------------------------------------------------- 1 | function astro() { 2 | return 'astro' 3 | } 4 | 5 | module.exports = { astro } 6 | -------------------------------------------------------------------------------- /playground/optimize-deps/dep-cjs-external-package-omit-js-suffix/test.okay.js: -------------------------------------------------------------------------------- 1 | function okay() { 2 | return 'okay' 3 | } 4 | 5 | module.exports = { okay } 6 | -------------------------------------------------------------------------------- /playground/optimize-deps/dep-cjs-external-package-omit-js-suffix/test.scss.js: -------------------------------------------------------------------------------- 1 | function scss() { 2 | return 'scss' 3 | } 4 | 5 | module.exports = { scss } 6 | -------------------------------------------------------------------------------- /playground/optimize-deps/dep-cjs-external-package-omit-js-suffix/test.tsx.js: -------------------------------------------------------------------------------- 1 | function tsx() { 2 | return 'tsx' 3 | } 4 | 5 | module.exports = { tsx } 6 | -------------------------------------------------------------------------------- /playground/optimize-deps/dep-cjs-with-assets/foo.css: -------------------------------------------------------------------------------- 1 | .cjs-with-assets { 2 | color: blue; 3 | } 4 | -------------------------------------------------------------------------------- /playground/optimize-deps/dep-cjs-with-assets/index.js: -------------------------------------------------------------------------------- 1 | require('./foo.css') 2 | 3 | exports.a = 11 4 | -------------------------------------------------------------------------------- /playground/optimize-deps/dep-css-require/index.cjs: -------------------------------------------------------------------------------- 1 | require('./style.css') 2 | -------------------------------------------------------------------------------- /playground/optimize-deps/dep-css-require/mod.cjs: -------------------------------------------------------------------------------- 1 | const style = require('./mod.module.css') 2 | module.exports = style 3 | -------------------------------------------------------------------------------- /playground/optimize-deps/dep-css-require/mod.module.css: -------------------------------------------------------------------------------- 1 | .cssModuleRequire { 2 | color: red; 3 | } 4 | -------------------------------------------------------------------------------- /playground/optimize-deps/dep-css-require/style.css: -------------------------------------------------------------------------------- 1 | .css-require { 2 | color: red; 3 | } 4 | -------------------------------------------------------------------------------- /playground/optimize-deps/dep-esbuild-plugin-transform/index.js: -------------------------------------------------------------------------------- 1 | // will be replaced by an esbuild plugin 2 | 3 | export const hello = () => `Hello from a package` 4 | -------------------------------------------------------------------------------- /playground/optimize-deps/dep-esm-external/index.js: -------------------------------------------------------------------------------- 1 | export function foo() { 2 | return 'foo' 3 | } 4 | -------------------------------------------------------------------------------- /playground/optimize-deps/dep-incompatible/index.js: -------------------------------------------------------------------------------- 1 | const subUrl = new URL('./sub.js', import.meta.url) 2 | 3 | export default () => import(subUrl) 4 | -------------------------------------------------------------------------------- /playground/optimize-deps/dep-incompatible/sub.js: -------------------------------------------------------------------------------- 1 | export default 'sub' 2 | -------------------------------------------------------------------------------- /playground/optimize-deps/dep-linked-include/Test.vue: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /playground/optimize-deps/dep-linked-include/foo.js: -------------------------------------------------------------------------------- 1 | export const msg = '[success] linked force include' 2 | -------------------------------------------------------------------------------- /playground/optimize-deps/dep-linked-include/test.css: -------------------------------------------------------------------------------- 1 | .dep-linked-include { 2 | color: red; 3 | } 4 | -------------------------------------------------------------------------------- /playground/optimize-deps/dep-linked/index.js: -------------------------------------------------------------------------------- 1 | export * from 'lodash-es' 2 | -------------------------------------------------------------------------------- /playground/optimize-deps/dep-node-env/index.js: -------------------------------------------------------------------------------- 1 | export const env = process.env.NODE_ENV === 'production' ? 'prod' : 'dev' 2 | -------------------------------------------------------------------------------- /playground/optimize-deps/dep-node-env/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@vitejs/test-dep-node-env", 3 | "private": true, 4 | "version": "1.0.0", 5 | "type": "module" 6 | } 7 | -------------------------------------------------------------------------------- /playground/optimize-deps/dep-not-js/foo.js: -------------------------------------------------------------------------------- 1 | export const foo = '[success] imported from .notjs file' 2 | -------------------------------------------------------------------------------- /playground/optimize-deps/dep-not-js/index.notjs: -------------------------------------------------------------------------------- 1 | 2 | import { foo } from './foo' 3 | export const notjsValue = foo 4 | 5 | -------------------------------------------------------------------------------- /playground/optimize-deps/dep-not-js/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@vitejs/test-dep-not-js", 3 | "private": true, 4 | "version": "1.0.0", 5 | "main": "index.notjs" 6 | } 7 | -------------------------------------------------------------------------------- /playground/optimize-deps/dep-relative-to-main/entry.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./') 2 | -------------------------------------------------------------------------------- /playground/optimize-deps/dep-relative-to-main/lib/main.js: -------------------------------------------------------------------------------- 1 | module.exports = '[success] imported from main' 2 | -------------------------------------------------------------------------------- /playground/optimize-deps/dep-source-map-no-sources/all.js: -------------------------------------------------------------------------------- 1 | export const all = 'all' 2 | export { sub } from './sub.js' 3 | -------------------------------------------------------------------------------- /playground/optimize-deps/dep-source-map-no-sources/sub.js: -------------------------------------------------------------------------------- 1 | export const sub = 'sub' 2 | -------------------------------------------------------------------------------- /playground/optimize-deps/dep-with-asset-ext/dep2/index.js: -------------------------------------------------------------------------------- 1 | export { default } from '@vitejs/test-dep-with-asset-ext1.pdf' 2 | -------------------------------------------------------------------------------- /playground/optimize-deps/dep-with-dynamic-import/dynamic.js: -------------------------------------------------------------------------------- 1 | export const foo = '[success] dependency with dynamic import' 2 | -------------------------------------------------------------------------------- /playground/optimize-deps/dep-with-dynamic-import/index.js: -------------------------------------------------------------------------------- 1 | export const lazyFoo = async function () { 2 | const { foo } = await import('./dynamic.js') 3 | return foo 4 | } 5 | -------------------------------------------------------------------------------- /playground/optimize-deps/index.astro: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /playground/optimize-deps/longfilename/index.js: -------------------------------------------------------------------------------- 1 | const test = 'hello world' 2 | 3 | export default test 4 | -------------------------------------------------------------------------------- /playground/optimize-deps/nested-exclude/index.js: -------------------------------------------------------------------------------- 1 | export { default as nestedInclude } from '@vitejs/test-nested-include' 2 | 3 | export default 'nested-exclude' 4 | -------------------------------------------------------------------------------- /playground/optimize-deps/nested-include/index.js: -------------------------------------------------------------------------------- 1 | // written in cjs, optimization should convert this to esm 2 | module.exports = 'nested-include' 3 | -------------------------------------------------------------------------------- /playground/optimize-missing-deps/main.js: -------------------------------------------------------------------------------- 1 | import { sayName } from '@vitejs/test-missing-dep' 2 | 3 | export const name = sayName() 4 | -------------------------------------------------------------------------------- /playground/optimize-missing-deps/missing-dep/index.js: -------------------------------------------------------------------------------- 1 | import { name } from '@vitejs/test-multi-entry-dep' 2 | 3 | export function sayName() { 4 | return name 5 | } 6 | -------------------------------------------------------------------------------- /playground/optimize-missing-deps/multi-entry-dep/index.browser.js: -------------------------------------------------------------------------------- 1 | exports.name = 'Client' 2 | -------------------------------------------------------------------------------- /playground/optimize-missing-deps/multi-entry-dep/index.js: -------------------------------------------------------------------------------- 1 | const path = require('node:path') 2 | 3 | exports.name = path.normalize('./Server') 4 | -------------------------------------------------------------------------------- /playground/preload/dep-a/index.js: -------------------------------------------------------------------------------- 1 | export const msgFromA = 'From dep-a' 2 | -------------------------------------------------------------------------------- /playground/preload/dep-including-a/index.js: -------------------------------------------------------------------------------- 1 | export { msgFromA } from '@vitejs/test-dep-a' 2 | 3 | export const msg = 'From dep-including-a' 4 | -------------------------------------------------------------------------------- /playground/preload/public/preloaded.js: -------------------------------------------------------------------------------- 1 | console.log('preloaded') 2 | -------------------------------------------------------------------------------- /playground/preload/src/about.js: -------------------------------------------------------------------------------- 1 | import { msg } from '@vitejs/test-dep-including-a' 2 | 3 | document.querySelector('#about .msg').textContent = msg 4 | -------------------------------------------------------------------------------- /playground/preload/src/chunk.js: -------------------------------------------------------------------------------- 1 | export default '[success] message from chunk.js' 2 | -------------------------------------------------------------------------------- /playground/preload/src/hello.module.css: -------------------------------------------------------------------------------- 1 | .h1 { 2 | color: red; 3 | } 4 | -------------------------------------------------------------------------------- /playground/preserve-symlinks/module-a/linked.js: -------------------------------------------------------------------------------- 1 | ./src/index.js -------------------------------------------------------------------------------- /playground/preserve-symlinks/module-a/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@vitejs/test-module-a", 3 | "private": true, 4 | "version": "0.0.0", 5 | "main": "linked.js" 6 | } 7 | -------------------------------------------------------------------------------- /playground/preserve-symlinks/module-a/src/data.js: -------------------------------------------------------------------------------- 1 | export const data = { 2 | msg: 'hello vite', 3 | } 4 | -------------------------------------------------------------------------------- /playground/preserve-symlinks/module-a/src/index.js: -------------------------------------------------------------------------------- 1 | import { data } from './data' 2 | 3 | export function sayHi() { 4 | return data 5 | } 6 | -------------------------------------------------------------------------------- /playground/preserve-symlinks/src/main.js: -------------------------------------------------------------------------------- 1 | import { sayHi } from '@vitejs/test-module-a' 2 | 3 | document.getElementById('root').innerText = sayHi().msg 4 | -------------------------------------------------------------------------------- /playground/proxy-hmr/index.html: -------------------------------------------------------------------------------- 1 | root app
2 | 3 | -------------------------------------------------------------------------------- /playground/proxy-hmr/other-app/index.html: -------------------------------------------------------------------------------- 1 | other app 2 | -------------------------------------------------------------------------------- /playground/resolve-linked/dep.js: -------------------------------------------------------------------------------- 1 | export const msg = 'dep from upper directory' 2 | -------------------------------------------------------------------------------- /playground/resolve-linked/src/index.js: -------------------------------------------------------------------------------- 1 | import { msg as depMsg } from '../dep' 2 | 3 | export const msg = `[success] out of root monorepo dep with ${depMsg}` 4 | -------------------------------------------------------------------------------- /playground/resolve/absolute.js: -------------------------------------------------------------------------------- 1 | export default '[success] absolute' 2 | -------------------------------------------------------------------------------- /playground/resolve/browser-field-bare-import-fail/main.js: -------------------------------------------------------------------------------- 1 | export default '[fail]' 2 | -------------------------------------------------------------------------------- /playground/resolve/browser-field-bare-import-fail/module.js: -------------------------------------------------------------------------------- 1 | export default '[fail]' 2 | -------------------------------------------------------------------------------- /playground/resolve/browser-field-bare-import-success/main.js: -------------------------------------------------------------------------------- 1 | export default '[fail]' 2 | -------------------------------------------------------------------------------- /playground/resolve/browser-field-bare-import-success/module.js: -------------------------------------------------------------------------------- 1 | export default '[success]' 2 | -------------------------------------------------------------------------------- /playground/resolve/browser-field/bare-import.js: -------------------------------------------------------------------------------- 1 | import message from '@vitejs/test-resolve-browser-field-bare-import-fail' 2 | export default message 3 | -------------------------------------------------------------------------------- /playground/resolve/browser-field/multiple.dot.path.js: -------------------------------------------------------------------------------- 1 | const fs = require('node:fs') 2 | console.log('this should not run in the browser') 3 | -------------------------------------------------------------------------------- /playground/resolve/browser-field/no-ext-index/index.js: -------------------------------------------------------------------------------- 1 | import jsdom from 'jsdom' // should be redirected to empty module 2 | export default '' 3 | -------------------------------------------------------------------------------- /playground/resolve/browser-field/no-ext.js: -------------------------------------------------------------------------------- 1 | import jsdom from 'jsdom' // should be redirected to empty module 2 | export default '' 3 | -------------------------------------------------------------------------------- /playground/resolve/browser-field/not-browser.js: -------------------------------------------------------------------------------- 1 | const fs = require('node:fs') 2 | console.log('this should not run in the browser') 3 | -------------------------------------------------------------------------------- /playground/resolve/browser-field/out/cjs.node.js: -------------------------------------------------------------------------------- 1 | export default 'fail' 2 | -------------------------------------------------------------------------------- /playground/resolve/browser-field/out/esm.browser.js: -------------------------------------------------------------------------------- 1 | import jsdom from 'jsdom' // should be redirected to empty module 2 | export default '[success] resolve browser field' 3 | -------------------------------------------------------------------------------- /playground/resolve/browser-module-field1/index.js: -------------------------------------------------------------------------------- 1 | export default '[fail] this should not run in the browser' 2 | -------------------------------------------------------------------------------- /playground/resolve/browser-module-field1/index.web.js: -------------------------------------------------------------------------------- 1 | export default '[success] this should run in browser' 2 | -------------------------------------------------------------------------------- /playground/resolve/browser-module-field2/index.js: -------------------------------------------------------------------------------- 1 | export default '[success] this should run in browser' 2 | -------------------------------------------------------------------------------- /playground/resolve/browser-module-field2/index.web.js: -------------------------------------------------------------------------------- 1 | module.exports = '[fail] this should not run in the browser' 2 | -------------------------------------------------------------------------------- /playground/resolve/browser-module-field3/index.js: -------------------------------------------------------------------------------- 1 | export default '[success] this should run in browser' 2 | -------------------------------------------------------------------------------- /playground/resolve/config-dep.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | a: 1, 3 | } 4 | -------------------------------------------------------------------------------- /playground/resolve/custom-browser-main-field/index.browser.js: -------------------------------------------------------------------------------- 1 | export const msg = 'resolved browser field' 2 | -------------------------------------------------------------------------------- /playground/resolve/custom-browser-main-field/index.custom.js: -------------------------------------------------------------------------------- 1 | export const msg = 'resolved custom field' 2 | -------------------------------------------------------------------------------- /playground/resolve/custom-browser-main-field/index.js: -------------------------------------------------------------------------------- 1 | export const msg = '[fail] resolved main field' 2 | -------------------------------------------------------------------------------- /playground/resolve/custom-condition/index.custom.js: -------------------------------------------------------------------------------- 1 | export const msg = '[success] custom condition' 2 | -------------------------------------------------------------------------------- /playground/resolve/custom-condition/index.js: -------------------------------------------------------------------------------- 1 | export const msg = '[fail]' 2 | -------------------------------------------------------------------------------- /playground/resolve/custom-ext.es: -------------------------------------------------------------------------------- 1 | export const msg = `[success] custom ext` 2 | -------------------------------------------------------------------------------- /playground/resolve/custom-main-field/index.custom.js: -------------------------------------------------------------------------------- 1 | export const msg = '[success] custom main field' 2 | -------------------------------------------------------------------------------- /playground/resolve/custom-main-field/index.js: -------------------------------------------------------------------------------- 1 | export const msg = '[fail]' 2 | -------------------------------------------------------------------------------- /playground/resolve/dir-with-ext.js/empty: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitejs/vite/e0586de502aa82a372039ec6cac50cf69414e6fc/playground/resolve/dir-with-ext.js/empty -------------------------------------------------------------------------------- /playground/resolve/dir-with-ext/index.js: -------------------------------------------------------------------------------- 1 | export const file = '[success] ./dir-with-ext/index.js' 2 | -------------------------------------------------------------------------------- /playground/resolve/dir.js: -------------------------------------------------------------------------------- 1 | export const file = '[success] dir.js' 2 | -------------------------------------------------------------------------------- /playground/resolve/dir/index.js: -------------------------------------------------------------------------------- 1 | export const file = 'dir/index.js' 2 | -------------------------------------------------------------------------------- /playground/resolve/drive-relative.js: -------------------------------------------------------------------------------- 1 | export default '[success] drive relative' 2 | -------------------------------------------------------------------------------- /playground/resolve/exact-extension/file.js: -------------------------------------------------------------------------------- 1 | export const file = '[success] file.js' 2 | -------------------------------------------------------------------------------- /playground/resolve/exact-extension/file.js.js: -------------------------------------------------------------------------------- 1 | export const file = 'file.js.js' 2 | -------------------------------------------------------------------------------- /playground/resolve/exact-extension/file.json.js: -------------------------------------------------------------------------------- 1 | export const file = '[success] file.json.js' 2 | -------------------------------------------------------------------------------- /playground/resolve/exports-and-nested-scope/nested-scope/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "type": "module" 4 | } 5 | -------------------------------------------------------------------------------- /playground/resolve/exports-env/browser.js: -------------------------------------------------------------------------------- 1 | export const msg = 'fail (browser.js)' 2 | -------------------------------------------------------------------------------- /playground/resolve/exports-env/browser.mjs: -------------------------------------------------------------------------------- 1 | export const msg = '[success] exports env (browser.mjs)' 2 | -------------------------------------------------------------------------------- /playground/resolve/exports-env/browser.prod.mjs: -------------------------------------------------------------------------------- 1 | export const msg = '[success] exports env (browser.prod.mjs)' 2 | -------------------------------------------------------------------------------- /playground/resolve/exports-env/fallback.umd.js: -------------------------------------------------------------------------------- 1 | export const msg = 'fail (fallback.umd.js)' 2 | -------------------------------------------------------------------------------- /playground/resolve/exports-from-root/file.js: -------------------------------------------------------------------------------- 1 | export const msg = '[success] exports from root (./file.js)' 2 | -------------------------------------------------------------------------------- /playground/resolve/exports-from-root/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitejs/vite/e0586de502aa82a372039ec6cac50cf69414e6fc/playground/resolve/exports-from-root/index.js -------------------------------------------------------------------------------- /playground/resolve/exports-from-root/nested/file.js: -------------------------------------------------------------------------------- 1 | export const msg = 'fail exports from root (./nested/file.js)' 2 | -------------------------------------------------------------------------------- /playground/resolve/exports-from-root/nested/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "exports": { 3 | ".": "./file.js" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /playground/resolve/exports-legacy-fallback/dir/index.js: -------------------------------------------------------------------------------- 1 | export const msg = '[fail] mapped js file' 2 | -------------------------------------------------------------------------------- /playground/resolve/exports-legacy-fallback/dir/index.mjs: -------------------------------------------------------------------------------- 1 | export const msg = '[success] mapped mjs file' 2 | -------------------------------------------------------------------------------- /playground/resolve/exports-legacy-fallback/dir/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "main": "index.js", 3 | "module": "index.mjs" 4 | } 5 | -------------------------------------------------------------------------------- /playground/resolve/exports-legacy-fallback/index.js: -------------------------------------------------------------------------------- 1 | export default 5 2 | -------------------------------------------------------------------------------- /playground/resolve/exports-path/cjs.js: -------------------------------------------------------------------------------- 1 | exports.msg = 'from cjs' 2 | -------------------------------------------------------------------------------- /playground/resolve/exports-path/deep.js: -------------------------------------------------------------------------------- 1 | export const msg = '[success] deep resolve from exports' 2 | -------------------------------------------------------------------------------- /playground/resolve/exports-path/deep.json: -------------------------------------------------------------------------------- 1 | { 2 | "foo": "json" 3 | } 4 | -------------------------------------------------------------------------------- /playground/resolve/exports-path/dir/dir.js: -------------------------------------------------------------------------------- 1 | export const msg = '[success] mapped directory from exports' 2 | -------------------------------------------------------------------------------- /playground/resolve/exports-path/main.js: -------------------------------------------------------------------------------- 1 | export const msg = '[success] entry resolve from exports' 2 | -------------------------------------------------------------------------------- /playground/resolve/exports-with-module-condition-required/index.cjs: -------------------------------------------------------------------------------- 1 | const { msg } = require('@vitejs/test-resolve-exports-with-module-condition') 2 | module.exports = { msg } 3 | -------------------------------------------------------------------------------- /playground/resolve/exports-with-module-condition/index.esm.js: -------------------------------------------------------------------------------- 1 | export const msg = '[success] exports with module condition (index.esm.js)' 2 | -------------------------------------------------------------------------------- /playground/resolve/exports-with-module-condition/index.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable import-x/no-commonjs */ 2 | module.exports.msg = '[fail] exports with module condition (index.js)' 3 | -------------------------------------------------------------------------------- /playground/resolve/exports-with-module-condition/index.mjs: -------------------------------------------------------------------------------- 1 | export const msg = '[fail] exports with module condition (index.mjs)' 2 | -------------------------------------------------------------------------------- /playground/resolve/exports-with-module/import.mjs: -------------------------------------------------------------------------------- 1 | // import.mjs should take precedence 2 | export const msg = '[success] exports with module (import.mjs)' 3 | -------------------------------------------------------------------------------- /playground/resolve/exports-with-module/module.mjs: -------------------------------------------------------------------------------- 1 | // import.mjs should take precedence 2 | export const msg = '[fail] exports with module (module.mjs)' 3 | -------------------------------------------------------------------------------- /playground/resolve/file-url.js: -------------------------------------------------------------------------------- 1 | export default '[success] file-url' 2 | -------------------------------------------------------------------------------- /playground/resolve/imports-path/nested-path.js: -------------------------------------------------------------------------------- 1 | export const msg = '[success] nested path subpath imports' 2 | -------------------------------------------------------------------------------- /playground/resolve/imports-path/other-pkg/nest/index.js: -------------------------------------------------------------------------------- 1 | export const msg = '[success] subpath imports from other package' 2 | -------------------------------------------------------------------------------- /playground/resolve/imports-path/other-pkg/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@vitejs/test-resolve-imports-pkg", 3 | "private": true 4 | } 5 | -------------------------------------------------------------------------------- /playground/resolve/imports-path/query.json: -------------------------------------------------------------------------------- 1 | { 2 | "foo": "json" 3 | } 4 | -------------------------------------------------------------------------------- /playground/resolve/imports-path/same-level.js: -------------------------------------------------------------------------------- 1 | export * from '#top-level' 2 | -------------------------------------------------------------------------------- /playground/resolve/imports-path/slash/index.js: -------------------------------------------------------------------------------- 1 | export const msg = '[success] subpath imports with slash' 2 | -------------------------------------------------------------------------------- /playground/resolve/imports-path/star/index.js: -------------------------------------------------------------------------------- 1 | export const msg = '[success] subpath imports with star' 2 | -------------------------------------------------------------------------------- /playground/resolve/imports-path/top-level.js: -------------------------------------------------------------------------------- 1 | export const msg = '[success] top level subpath imports' 2 | -------------------------------------------------------------------------------- /playground/resolve/inline-package/inline.js: -------------------------------------------------------------------------------- 1 | export const msg = '[success] from inline package' 2 | -------------------------------------------------------------------------------- /playground/resolve/non-normalized.js: -------------------------------------------------------------------------------- 1 | export default '[success] non normalized absolute path' 2 | -------------------------------------------------------------------------------- /playground/resolve/public/should-not-be-copied: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitejs/vite/e0586de502aa82a372039ec6cac50cf69414e6fc/playground/resolve/public/should-not-be-copied -------------------------------------------------------------------------------- /playground/resolve/sharp-dir/index.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | last: require('es5-ext/string/#/last.js'), 3 | } 4 | -------------------------------------------------------------------------------- /playground/resolve/ts-extension/hello.ts: -------------------------------------------------------------------------------- 1 | export const msg = '[success] use .js extension to import a ts module' 2 | -------------------------------------------------------------------------------- /playground/resolve/ts-extension/hellocjs.cts: -------------------------------------------------------------------------------- 1 | export const msgCjs = '[success] use .cjs extension to import a CommonJS module' 2 | -------------------------------------------------------------------------------- /playground/resolve/ts-extension/hellojsx.tsx: -------------------------------------------------------------------------------- 1 | export const msgJsx = '[success] use .jsx extension to import a tsx module' 2 | -------------------------------------------------------------------------------- /playground/resolve/ts-extension/hellomjs.mts: -------------------------------------------------------------------------------- 1 | export const msgMjs = '[success] use .mjs extension to import an ESM module' 2 | -------------------------------------------------------------------------------- /playground/resolve/ts-extension/hellotsx.tsx: -------------------------------------------------------------------------------- 1 | export const msgTsx = '[success] use .js extension to import a tsx module' 2 | -------------------------------------------------------------------------------- /playground/resolve/utf8-bom-package/index.mjs: -------------------------------------------------------------------------------- 1 | export const msg = '[success]' 2 | -------------------------------------------------------------------------------- /playground/resolve/utf8-bom/main.js: -------------------------------------------------------------------------------- 1 | import '@babel/runtime/helpers/esm/slicedToArray' 2 | 3 | export const msg = '[success]' 4 | -------------------------------------------------------------------------------- /playground/resolve/util/bar.util.js: -------------------------------------------------------------------------------- 1 | export function bar() { 2 | return '[success] resolve filename containing dot and omitting ext' 3 | } 4 | -------------------------------------------------------------------------------- /playground/resolve/util/index.js: -------------------------------------------------------------------------------- 1 | export function foo() { 2 | return '[success] resolve omitted /index.*' 3 | } 4 | -------------------------------------------------------------------------------- /playground/self-referencing/index.js: -------------------------------------------------------------------------------- 1 | export const isSelfReference = true 2 | -------------------------------------------------------------------------------- /playground/self-referencing/test/index.js: -------------------------------------------------------------------------------- 1 | export { isSelfReference } from '@vitejs/self-referencing' 2 | -------------------------------------------------------------------------------- /playground/ssr-alias/alias-original/index.js: -------------------------------------------------------------------------------- 1 | export default 'original' 2 | -------------------------------------------------------------------------------- /playground/ssr-alias/src/alias-process.js: -------------------------------------------------------------------------------- 1 | export default { 2 | env: { __TEST_ALIAS__: 'ok' }, 3 | } 4 | -------------------------------------------------------------------------------- /playground/ssr-alias/src/alias-replaced.js: -------------------------------------------------------------------------------- 1 | export default 'ok' 2 | -------------------------------------------------------------------------------- /playground/ssr-conditions/external/browser.js: -------------------------------------------------------------------------------- 1 | export default 'browser.js' 2 | -------------------------------------------------------------------------------- /playground/ssr-conditions/external/default.js: -------------------------------------------------------------------------------- 1 | export default 'default.js' 2 | -------------------------------------------------------------------------------- /playground/ssr-conditions/external/edge.js: -------------------------------------------------------------------------------- 1 | export default 'edge.js' 2 | -------------------------------------------------------------------------------- /playground/ssr-conditions/external/node.js: -------------------------------------------------------------------------------- 1 | export default 'node.js' 2 | -------------------------------------------------------------------------------- /playground/ssr-conditions/external/node.unbundled.js: -------------------------------------------------------------------------------- 1 | export default 'node.unbundled.js' 2 | -------------------------------------------------------------------------------- /playground/ssr-conditions/no-external/browser.js: -------------------------------------------------------------------------------- 1 | export default 'browser.js' 2 | -------------------------------------------------------------------------------- /playground/ssr-conditions/no-external/default.js: -------------------------------------------------------------------------------- 1 | export default 'default.js' 2 | -------------------------------------------------------------------------------- /playground/ssr-conditions/no-external/edge.js: -------------------------------------------------------------------------------- 1 | export default 'edge.js' 2 | -------------------------------------------------------------------------------- /playground/ssr-conditions/no-external/node.js: -------------------------------------------------------------------------------- 1 | export default 'node.js' 2 | -------------------------------------------------------------------------------- /playground/ssr-conditions/no-external/node.unbundled.js: -------------------------------------------------------------------------------- 1 | export default 'node.unbundled.js' 2 | -------------------------------------------------------------------------------- /playground/ssr-deps/css-lib/index.css: -------------------------------------------------------------------------------- 1 | .css-lib { 2 | color: blue; 3 | } 4 | -------------------------------------------------------------------------------- /playground/ssr-deps/css-lib/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@vitejs/test-css-lib", 3 | "private": true, 4 | "version": "0.0.0", 5 | "main": "./index.css" 6 | } 7 | -------------------------------------------------------------------------------- /playground/ssr-deps/define-properties-exports/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@vitejs/test-define-properties-exports", 3 | "private": true, 4 | "version": "0.0.0" 5 | } 6 | -------------------------------------------------------------------------------- /playground/ssr-deps/define-property-exports/index.js: -------------------------------------------------------------------------------- 1 | Object.defineProperty(exports, 'hello', { 2 | value() { 3 | return 'Hello World!' 4 | }, 5 | }) 6 | -------------------------------------------------------------------------------- /playground/ssr-deps/define-property-exports/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@vitejs/test-define-property-exports", 3 | "private": true, 4 | "version": "0.0.0" 5 | } 6 | -------------------------------------------------------------------------------- /playground/ssr-deps/external-entry/index.js: -------------------------------------------------------------------------------- 1 | export default undefined 2 | -------------------------------------------------------------------------------- /playground/ssr-deps/forwarded-export/index.js: -------------------------------------------------------------------------------- 1 | const original = require('object-assigned-exports') 2 | module.exports = original 3 | -------------------------------------------------------------------------------- /playground/ssr-deps/import-builtin-cjs/index.js: -------------------------------------------------------------------------------- 1 | exports.stream = require('node:stream') 2 | 3 | exports.hello = function () { 4 | return 'Hello World!' 5 | } 6 | -------------------------------------------------------------------------------- /playground/ssr-deps/message: -------------------------------------------------------------------------------- 1 | File Content! 2 | -------------------------------------------------------------------------------- /playground/ssr-deps/module-condition/import.mjs: -------------------------------------------------------------------------------- 1 | export default '[success]' 2 | -------------------------------------------------------------------------------- /playground/ssr-deps/nested-exclude/index.js: -------------------------------------------------------------------------------- 1 | export { default as nestedInclude } from '@vitejs/test-nested-include' 2 | 3 | export default 'nested-exclude' 4 | -------------------------------------------------------------------------------- /playground/ssr-deps/nested-include/index.js: -------------------------------------------------------------------------------- 1 | // written in cjs, optimization should convert this to esm 2 | module.exports = 'nested-include' 3 | -------------------------------------------------------------------------------- /playground/ssr-deps/nested-include/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@vitejs/test-nested-include", 3 | "private": true, 4 | "version": "1.0.0", 5 | "main": "index.js" 6 | } 7 | -------------------------------------------------------------------------------- /playground/ssr-deps/no-external-cjs/index.js: -------------------------------------------------------------------------------- 1 | exports.hello = function () { 2 | return 'Hello World!' 3 | } 4 | -------------------------------------------------------------------------------- /playground/ssr-deps/object-assigned-exports/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@vitejs/test-object-assigned-exports", 3 | "private": true, 4 | "version": "0.0.0" 5 | } 6 | -------------------------------------------------------------------------------- /playground/ssr-deps/only-object-assigned-exports/index.js: -------------------------------------------------------------------------------- 1 | Object.assign(exports, { 2 | hello() { 3 | return 'Hello World!' 4 | }, 5 | }) 6 | -------------------------------------------------------------------------------- /playground/ssr-deps/optimized-cjs-with-nested-external/index.js: -------------------------------------------------------------------------------- 1 | const getMessage = require('nested-external') 2 | 3 | module.exports = { 4 | hello: getMessage, 5 | } 6 | -------------------------------------------------------------------------------- /playground/ssr-deps/optimized-with-nested-external/index.js: -------------------------------------------------------------------------------- 1 | import getMessage from 'nested-external' 2 | 3 | export function hello() { 4 | return getMessage() 5 | } 6 | -------------------------------------------------------------------------------- /playground/ssr-deps/pkg-exports/index.js: -------------------------------------------------------------------------------- 1 | export default undefined 2 | -------------------------------------------------------------------------------- /playground/ssr-deps/primitive-export/index.js: -------------------------------------------------------------------------------- 1 | module.exports = 'Hello World!' 2 | -------------------------------------------------------------------------------- /playground/ssr-deps/primitive-export/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@vitejs/test-primitive-export", 3 | "private": true, 4 | "version": "0.0.0" 5 | } 6 | -------------------------------------------------------------------------------- /playground/ssr-deps/read-file-content/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@vitejs/test-read-file-content", 3 | "private": true, 4 | "version": "0.0.0" 5 | } 6 | -------------------------------------------------------------------------------- /playground/ssr-deps/require-absolute/foo.js: -------------------------------------------------------------------------------- 1 | module.exports.hello = 'Hello World!' 2 | -------------------------------------------------------------------------------- /playground/ssr-deps/require-absolute/index.js: -------------------------------------------------------------------------------- 1 | const path = require('node:path') 2 | 3 | module.exports.hello = () => require(path.resolve(__dirname, './foo.js')).hello 4 | -------------------------------------------------------------------------------- /playground/ssr-deps/require-absolute/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@vitejs/test-require-absolute", 3 | "private": true, 4 | "version": "0.0.0" 5 | } 6 | -------------------------------------------------------------------------------- /playground/ssr-deps/src/isomorphic-module-browser.js: -------------------------------------------------------------------------------- 1 | const message = 'message from isomorphic-module (browser): [browser]' 2 | 3 | export default message 4 | -------------------------------------------------------------------------------- /playground/ssr-deps/src/isomorphic-module-server.js: -------------------------------------------------------------------------------- 1 | const message = 'message from isomorphic-module (server): [server]' 2 | 3 | export default message 4 | -------------------------------------------------------------------------------- /playground/ssr-deps/ts-transpiled-exports/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@vitejs/test-ts-transpiled-exports", 3 | "private": true, 4 | "version": "0.0.0" 5 | } 6 | -------------------------------------------------------------------------------- /playground/ssr-html/src/error-js.js: -------------------------------------------------------------------------------- 1 | export function error() { 2 | throw new Error('e') 3 | } 4 | -------------------------------------------------------------------------------- /playground/ssr-html/src/error-ts.ts: -------------------------------------------------------------------------------- 1 | export function error() { 2 | throw new Error('e') 3 | } 4 | -------------------------------------------------------------------------------- /playground/ssr-html/src/importedVirtual.js: -------------------------------------------------------------------------------- 1 | export const virtual = '[success]' 2 | -------------------------------------------------------------------------------- /playground/ssr-noexternal/external-cjs/import.mjs: -------------------------------------------------------------------------------- 1 | throw new Error('shouldnt be loaded') 2 | -------------------------------------------------------------------------------- /playground/ssr-noexternal/external-cjs/require.cjs: -------------------------------------------------------------------------------- 1 | module.exports = 'foo' 2 | -------------------------------------------------------------------------------- /playground/ssr-noexternal/require-external-cjs/main.js: -------------------------------------------------------------------------------- 1 | module.exports = require('@vitejs/test-external-cjs') 2 | -------------------------------------------------------------------------------- /playground/ssr-pug/src/app.js: -------------------------------------------------------------------------------- 1 | const p = document.createElement('p') 2 | p.innerHTML = '✅ Dynamically injected script from file' 3 | document.body.appendChild(p) 4 | -------------------------------------------------------------------------------- /playground/ssr-resolve/deep-import/foo/index.js: -------------------------------------------------------------------------------- 1 | export default 'foo' 2 | -------------------------------------------------------------------------------- /playground/ssr-resolve/deep-import/foo/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "version": "0.0.0", 4 | "type": "module", 5 | "module": "./index.js" 6 | } 7 | -------------------------------------------------------------------------------- /playground/ssr-resolve/deep-import/index.js: -------------------------------------------------------------------------------- 1 | export { default as foo } from './foo' 2 | export { default as bar } from './bar' 3 | export default 'external-nested' 4 | -------------------------------------------------------------------------------- /playground/ssr-resolve/deep-import/utils/bar.js: -------------------------------------------------------------------------------- 1 | export default 'bar' 2 | -------------------------------------------------------------------------------- /playground/ssr-resolve/entries/dir/index.js: -------------------------------------------------------------------------------- 1 | module.exports = __filename.slice(__filename.lastIndexOf('entries')) 2 | -------------------------------------------------------------------------------- /playground/ssr-resolve/entries/file.js: -------------------------------------------------------------------------------- 1 | module.exports = __filename.slice(__filename.lastIndexOf('entries')) 2 | -------------------------------------------------------------------------------- /playground/ssr-resolve/entries/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@vitejs/test-entries", 3 | "private": true, 4 | "version": "0.0.0" 5 | } 6 | -------------------------------------------------------------------------------- /playground/ssr-resolve/pkg-exports/entry.js: -------------------------------------------------------------------------------- 1 | module.exports = 'pkg-exports entry' 2 | -------------------------------------------------------------------------------- /playground/ssr-resolve/pkg-exports/index.js: -------------------------------------------------------------------------------- 1 | module.exports = undefined 2 | -------------------------------------------------------------------------------- /playground/ssr-resolve/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | 3 | export default defineConfig({ 4 | build: { 5 | ssr: './main.js', 6 | }, 7 | }) 8 | -------------------------------------------------------------------------------- /playground/ssr-webworker/browser-exports/browser.js: -------------------------------------------------------------------------------- 1 | export default '[success] browser' 2 | -------------------------------------------------------------------------------- /playground/ssr-webworker/browser-exports/node.js: -------------------------------------------------------------------------------- 1 | export default '[fail] should not load me' 2 | -------------------------------------------------------------------------------- /playground/ssr-webworker/src/dynamic.js: -------------------------------------------------------------------------------- 1 | export const foo = 'foo' 2 | -------------------------------------------------------------------------------- /playground/ssr-webworker/worker-exports/node.js: -------------------------------------------------------------------------------- 1 | export default '[fail] should not load me' 2 | -------------------------------------------------------------------------------- /playground/ssr-webworker/worker-exports/worker.js: -------------------------------------------------------------------------------- 1 | export default '[success] worker' 2 | -------------------------------------------------------------------------------- /playground/ssr/src/circular-dep-init/README.md: -------------------------------------------------------------------------------- 1 | This test aim to find out wherever the modules with circular dependencies are correctly initialized 2 | -------------------------------------------------------------------------------- /playground/ssr/src/circular-dep-init/circular-dep-init.js: -------------------------------------------------------------------------------- 1 | export * from './module-a' 2 | export { getValueAB } from './module-b' 3 | -------------------------------------------------------------------------------- /playground/ssr/src/circular-dep-init/module-a.js: -------------------------------------------------------------------------------- 1 | export const valueA = 'circ-dep-init-a' 2 | -------------------------------------------------------------------------------- /playground/ssr/src/circular-import/a.js: -------------------------------------------------------------------------------- 1 | import { getB } from './b' 2 | 3 | export const A = '__A__' 4 | 5 | export const B = getB() 6 | -------------------------------------------------------------------------------- /playground/ssr/src/circular-import/b.js: -------------------------------------------------------------------------------- 1 | export function getB() { 2 | return '__B__' 3 | } 4 | 5 | export { A } from './a' 6 | -------------------------------------------------------------------------------- /playground/ssr/src/circular-import/index.js: -------------------------------------------------------------------------------- 1 | import { A } from './b' 2 | 3 | export function logA() { 4 | return `A is: ${A}` 5 | } 6 | -------------------------------------------------------------------------------- /playground/ssr/src/circular-import2/a.js: -------------------------------------------------------------------------------- 1 | import { getB } from './b' 2 | 3 | export const A = '__A__' 4 | 5 | export const B = getB() 6 | -------------------------------------------------------------------------------- /playground/ssr/src/circular-import2/b.js: -------------------------------------------------------------------------------- 1 | export { A } from './a' 2 | 3 | export function getB() { 4 | return '__B__' 5 | } 6 | -------------------------------------------------------------------------------- /playground/ssr/src/circular-import2/index.js: -------------------------------------------------------------------------------- 1 | import { A } from './b' 2 | 3 | export function logA() { 4 | return `A is: ${A}` 5 | } 6 | -------------------------------------------------------------------------------- /playground/ssr/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | 3 | // in order to trigger ssr server restart 4 | export default defineConfig({}) 5 | -------------------------------------------------------------------------------- /playground/tailwind-sourcemap/tailwind.css: -------------------------------------------------------------------------------- 1 | @import 'tailwindcss'; 2 | -------------------------------------------------------------------------------- /playground/tailwind-v3/index.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | -------------------------------------------------------------------------------- /playground/tailwind-v3/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | -------------------------------------------------------------------------------- /playground/tailwind/index.css: -------------------------------------------------------------------------------- 1 | @import 'tailwindcss'; 2 | @config './tailwind.config.ts'; 3 | -------------------------------------------------------------------------------- /playground/tailwind/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitejs/vite/e0586de502aa82a372039ec6cac50cf69414e6fc/playground/tailwind/public/favicon.ico -------------------------------------------------------------------------------- /playground/transform-plugin/__tests__/transform-plugin.spec.ts: -------------------------------------------------------------------------------- 1 | import { tests } from './tests' 2 | 3 | tests() 4 | -------------------------------------------------------------------------------- /playground/transform-plugin/index.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | -------------------------------------------------------------------------------- /playground/transform-plugin/index.js: -------------------------------------------------------------------------------- 1 | // 'TRANSFORM_COUNT' is injected by the transform plugin 2 | document.getElementById('transform-count').innerHTML = TRANSFORM_COUNT 3 | -------------------------------------------------------------------------------- /playground/transform-plugin/plugin-dep-load.js: -------------------------------------------------------------------------------- 1 | // Empty file for detecting changes in tests 2 | -------------------------------------------------------------------------------- /playground/transform-plugin/plugin-dep.js: -------------------------------------------------------------------------------- 1 | // Empty file for detecting changes in tests 2 | -------------------------------------------------------------------------------- /playground/tsconfig-json-load-error/has-error/main.ts: -------------------------------------------------------------------------------- 1 | console.log('tsconfig error fixed, file loaded') 2 | -------------------------------------------------------------------------------- /playground/tsconfig-json-load-error/src/main.ts: -------------------------------------------------------------------------------- 1 | // @ts-nocheck 2 | import '../has-error/main' 3 | -------------------------------------------------------------------------------- /playground/tsconfig-json/nested-with-extends/not-used-type.ts: -------------------------------------------------------------------------------- 1 | console.log('nested-with-extends side effect') 2 | 3 | export class NestedWithExtendsTypeOnlyClass {} 4 | -------------------------------------------------------------------------------- /playground/tsconfig-json/nested/not-used-type.ts: -------------------------------------------------------------------------------- 1 | console.log('nested side effect') 2 | 3 | export class NestedTypeOnlyClass {} 4 | -------------------------------------------------------------------------------- /playground/tsconfig-json/src/not-used-type.ts: -------------------------------------------------------------------------------- 1 | console.log('main side effect') 2 | 3 | export class MainTypeOnlyClass {} 4 | -------------------------------------------------------------------------------- /playground/wasm/add.wasm: -------------------------------------------------------------------------------- 1 | asm`addadd2add3add4 2 | ! j  j  j  j -------------------------------------------------------------------------------- /playground/wasm/heavy.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitejs/vite/e0586de502aa82a372039ec6cac50cf69414e6fc/playground/wasm/heavy.wasm -------------------------------------------------------------------------------- /playground/wasm/light.wasm: -------------------------------------------------------------------------------- 1 | asm``imports imported_func exported_func 2 | A* -------------------------------------------------------------------------------- /playground/wasm/worker.js: -------------------------------------------------------------------------------- 1 | import init from './add.wasm?init' 2 | init().then(({ exports }) => { 3 | self.postMessage({ result: exports.add(1, 2) }) 4 | }) 5 | -------------------------------------------------------------------------------- /playground/worker/classic-esm.js: -------------------------------------------------------------------------------- 1 | export const msg = '[success] classic-esm' 2 | -------------------------------------------------------------------------------- /playground/worker/dep-cjs/index.cjs: -------------------------------------------------------------------------------- 1 | exports.test = '[cjs ok]' 2 | -------------------------------------------------------------------------------- /playground/worker/dep-cjs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@vitejs/test-worker-dep-cjs", 3 | "type": "commonjs", 4 | "exports": "./index.cjs" 5 | } 6 | -------------------------------------------------------------------------------- /playground/worker/dep-to-optimize/index.js: -------------------------------------------------------------------------------- 1 | export const msg = 'dep-to-optimize' 2 | -------------------------------------------------------------------------------- /playground/worker/modules/module0.js: -------------------------------------------------------------------------------- 1 | export default 'A string' 2 | -------------------------------------------------------------------------------- /playground/worker/modules/module1.js: -------------------------------------------------------------------------------- 1 | export const msg1 = 'module1' 2 | -------------------------------------------------------------------------------- /playground/worker/modules/module2.js: -------------------------------------------------------------------------------- 1 | export * from './module0' 2 | export * from './module1' 3 | export const msg2 = 'module2' 4 | -------------------------------------------------------------------------------- /playground/worker/modules/module3.js: -------------------------------------------------------------------------------- 1 | export * from './module0' 2 | export const msg3 = 'module3' 3 | -------------------------------------------------------------------------------- /playground/worker/modules/test-plugin.js: -------------------------------------------------------------------------------- 1 | export const bundleWithPlugin = 'worker bundle with plugin fail. ' 2 | -------------------------------------------------------------------------------- /playground/worker/modules/workerImport.ts: -------------------------------------------------------------------------------- 1 | export const msg = 'pong' 2 | export const mode = process.env.NODE_ENV 3 | -------------------------------------------------------------------------------- /playground/worker/public/classic.js: -------------------------------------------------------------------------------- 1 | self.constant = 'A classic' 2 | -------------------------------------------------------------------------------- /playground/worker/simple-worker.js: -------------------------------------------------------------------------------- 1 | self.postMessage('Hello from simple worker!') 2 | -------------------------------------------------------------------------------- /playground/worker/vite.config-sourcemap-hidden.js: -------------------------------------------------------------------------------- 1 | import sourcemap from './worker-sourcemap-config.js' 2 | export default sourcemap('hidden') 3 | -------------------------------------------------------------------------------- /playground/worker/vite.config-sourcemap-inline.js: -------------------------------------------------------------------------------- 1 | import sourcemap from './worker-sourcemap-config.js' 2 | export default sourcemap('inline') 3 | -------------------------------------------------------------------------------- /playground/worker/vite.config-sourcemap.js: -------------------------------------------------------------------------------- 1 | import sourcemap from './worker-sourcemap-config.js' 2 | export default sourcemap(true) 3 | -------------------------------------------------------------------------------- /pnpm-workspace.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | - 'packages/*' 3 | - 'playground/**' 4 | - 'packages/**/__tests__/**' 5 | - docs 6 | -------------------------------------------------------------------------------- /scripts/publishCI.ts: -------------------------------------------------------------------------------- 1 | import { publish } from '@vitejs/release-scripts' 2 | 3 | publish({ defaultPackage: 'vite', provenance: true, packageManager: 'pnpm' }) 4 | --------------------------------------------------------------------------------