mirror of
https://github.com/LukeHagar/sveltekit-og.git
synced 2025-12-06 12:47:49 +00:00
No CF support yet version
This commit is contained in:
@@ -9,4 +9,7 @@
|
||||
<body>
|
||||
<div>%sveltekit.body%</div>
|
||||
</body>
|
||||
<script>
|
||||
var global = global || window
|
||||
</script>
|
||||
</html>
|
||||
|
||||
@@ -1,15 +1,21 @@
|
||||
import { sveltekit } from '@sveltejs/kit/vite';
|
||||
import nodePolyfills from 'rollup-plugin-node-polyfills';
|
||||
import { NodeModulesPolyfillPlugin } from '@esbuild-plugins/node-modules-polyfill';
|
||||
import rollupNodePolyFill from 'rollup-plugin-node-polyfills';
|
||||
|
||||
|
||||
const config = {
|
||||
plugins: [sveltekit()],
|
||||
define: {
|
||||
_a: 'undefined'
|
||||
optimizeDeps: {
|
||||
esbuildOptions: {
|
||||
define: {
|
||||
global: 'globalThis'
|
||||
},
|
||||
plugins: [NodeModulesPolyfillPlugin()]
|
||||
}
|
||||
},
|
||||
build: {
|
||||
polyfillModulePreload: true,
|
||||
rollupOptions: {
|
||||
plugins: [nodePolyfills()]
|
||||
plugins: [rollupNodePolyFill()]
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user