You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
npm init svelte@next my-app
cd my-app
npm install
npm i -D svelte-i18n @sveltejs/adapter-node@next
use adapter-node in svelte.config.js:
importadapterfrom'@sveltejs/adapter-node';importpreprocessfrom'svelte-preprocess';/** @type {import('@sveltejs/kit').Config} */constconfig={// Consult https://github.com/sveltejs/svelte-preprocess// for more information about preprocessorspreprocess: preprocess(),kit: {adapter: adapter()}};exportdefaultconfig;
and build the project npm run build
The generated file build/server/entries/pages/index.svelte.js is:
import{cascreate_ssr_component}from"../../chunks/index-2dc61825.js";constRoutes=create_ssr_component(($$result,$$props,$$bindings,slots)=>{return`<h1>Welcome to SvelteKit</h1><p>Visit <a href="${"https://kit.svelte.dev"}">kit.svelte.dev</a> to read the documentation</p>`;});export{Routesasdefault};
Now import svelte-i18n in src/routes/index.svelte
<scriptlang="ts">import'svelte-i18n';</script><h1>Welcome to SvelteKit</h1><p>Visit <ahref="https://kit.svelte.dev">kit.svelte.dev</a> to read the documentation</p>
rebuild, the generated file build/server/entries/pages/index.svelte.js is now:
Describe the bug
I am not sure but it seems that there is a bundling problem in the latest version of svelte-kit.
Reproduction
https://stackblitz.com/edit/sveltejs-kit-template-default-tvp61o
Create a typescript skeleton project:
npm init svelte@next my-app cd my-app npm install npm i -D svelte-i18n @sveltejs/adapter-node@next
use adapter-node in svelte.config.js:
and build the project
npm run build
The generated file
build/server/entries/pages/index.svelte.js
is:Now import
svelte-i18n
insrc/routes/index.svelte
rebuild, the generated file
build/server/entries/pages/index.svelte.js
is now:The build directory now needs node_modules with all necessary imports.
Logs
No response
System Info
Severity
blocking an upgrade
Additional Information
related to #4271
The text was updated successfully, but these errors were encountered: