Fix JS polyfills missing after the Vite switch (#34758)
This commit is contained in:
parent
6ab96ba647
commit
83dd09d4dc
7 changed files with 59 additions and 4 deletions
|
@ -10,6 +10,7 @@ import RailsPlugin from 'vite-plugin-rails';
|
|||
import { VitePWA } from 'vite-plugin-pwa';
|
||||
import tsconfigPaths from 'vite-tsconfig-paths';
|
||||
import yaml from 'js-yaml';
|
||||
import legacy from '@vitejs/plugin-legacy';
|
||||
|
||||
import { defineConfig, UserConfigFnPromise, UserConfig } from 'vite';
|
||||
import postcssPresetEnv from 'postcss-preset-env';
|
||||
|
@ -119,6 +120,10 @@ export const config: UserConfigFnPromise = async ({ mode, command }) => {
|
|||
}),
|
||||
MastodonServiceWorkerLocales(),
|
||||
MastodonEmojiCompressed(),
|
||||
legacy({
|
||||
renderLegacyChunks: false,
|
||||
modernPolyfills: true,
|
||||
}),
|
||||
VitePWA({
|
||||
srcDir: 'mastodon/service_worker',
|
||||
// We need to use injectManifest because we use our own service worker
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue