-
I'm using a dependency which uses Object.hasOwn. import { vitePlugin as remix } from '@remix-run/dev';
import { defineConfig } from 'vite';
import tsconfigPaths from 'vite-tsconfig-paths';
import legacy from '@vitejs/plugin-legacy';
export default defineConfig({
base: process.env.CDN_URL,
plugins: [
remix({
future: { v3_fetcherPersist: true, v3_relativeSplatPath: true, v3_throwAbortReason: true },
}),
tsconfigPaths(),
legacy({
polyfills: false,
renderLegacyChunks: false,
modernPolyfills: ['es/object/has-own'],
renderModernChunks: true,
}),
],
}); Since I don't need to support legacy browsers I turned off legacy chunk rendering. I tried using the legacy polyfill but that didn't help. After searching the Internet, I can't seem to find any tutorials or documents on polyfilling with remix (vite). Please provide help🙏 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I tried disabling |
Beta Was this translation helpful? Give feedback.
-
You could load any polyfill inside |
Beta Was this translation helpful? Give feedback.
You could load any polyfill inside
app/entry.client
as that will run before any other JS