Skip to content

Commit

Permalink
Remove legacy plugin
Browse files Browse the repository at this point in the history
There was a recent change[^1] to `@vitejs/plugin-legacy` that made it
hard-code the target to `['es2020', 'edge79', 'firefox67', 'chrome64',
'safari11.1']`. This unfortunately means the build fails if there are
any async generators (i.e. `function* foo() {}`). I can't figure out how
to make Vite ignore the `ForAwait*.vue` components, so I'll remove the
legacy plugin for now.

[^1]:
    [PR](vitejs/vite#10072),
    [commit](vitejs/vite@a13a7eb)
  • Loading branch information
mklein994 committed Sep 27, 2022
1 parent 0e31d68 commit 0297b1f
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 102 deletions.
1 change: 0 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ jobs:
VITE_COMMIT_HASH: ${{ github.sha }}
VITE_SENTRY_DSN: https://[email protected]/6162360
VITE_SENTRY_ENVIRONMENT: ${{ github.ref_name == 'main' && 'release' || 'development' }}
BUILDTIME_LEGACY_ENABLED: true
run: pnpm run build:all

- name: Setup Sentry
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
"@types/node": "^18.7.18",
"@typescript-eslint/eslint-plugin": "^5.38.0",
"@typescript-eslint/parser": "^5.38.0",
"@vitejs/plugin-legacy": "^2.2.0",
"@vitejs/plugin-vue": "^3.1.0",
"@vitest/coverage-c8": "^0.23.4",
"@vue/test-utils": "^2.0.2",
Expand Down
105 changes: 9 additions & 96 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src/views/DebugInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ const debugInfo = {
DEV: import.meta.env.DEV,
SSR: import.meta.env.SSR,
PROD: import.meta.env.PROD,
LEGACY: import.meta.env.LEGACY,
BASE_URL: import.meta.env.BASE_URL,
URL: import.meta.url,
HOT: import.meta.hot ?? "(undefined)",
Expand Down
3 changes: 0 additions & 3 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/// <reference types="vitest" />

import legacy from "@vitejs/plugin-legacy";
import vue from "@vitejs/plugin-vue";
import fs from "fs";
import { fileURLToPath, URL } from "url";
Expand All @@ -24,7 +23,6 @@ export default defineConfig(({ mode }) => {
const sunriseRoot = wasmSupported
? env.BUILDTIME_SUNRISE_CLI_ROOT ?? "../sunrise-cli"
: "./src/fake/sunrise-cli";
const isLegacy = (env.BUILDTIME_LEGACY_ENABLED ?? "false") === "true";
const isReproducible =
(env.BUILDTIME_REPRODUCIBLE_ENABLED ?? "false") === "true";

Expand Down Expand Up @@ -107,7 +105,6 @@ export default defineConfig(({ mode }) => {
},
}),
tailwindPlugin(),
isLegacy && legacy(),
],
};
});

0 comments on commit 0297b1f

Please sign in to comment.