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