Open alphonso06 opened 2 years ago
Same, it is maybe because not using rollup in svelte Kit
This issue has already been resolved in a svelte-kit repo
I'm actually running a brand new fork of this repo, and the issue is still happening. Overriding the build target per the comments in that issue has not fixed the errors either here. I've even tried updating sveltekit to the latest next.315, no change.
It seems like multiple people are missing the fix here, so could someone please explain the solution in more detail.
Would it be too rude to bump this? https://github.com/matyunya/smelte/issues/279
@adrian13val Seems like configuring Vite's target build indeed solves the issue when building. However, it still reproduces when running the dev server, this configuration seems to have no effect there
Adding this into my vite config helped solve the problem
optimizeDeps:{ esbuildOptions:{ target: 'es2020' }
Adding this into my vite config helped solve the problem
optimizeDeps:{ esbuildOptions:{ target: 'es2020' }
adding it gives me this new error
Internal server error: Failed to resolve import "svelte-waypoint" from "node_modules\smelte\src\components\Image\Image.svelte". Does the file exist?
Plugin: vite:import-analysis
File: D:/languages/web/projects/svelte-todo-android/node_modules/smelte/src/components/Image/Image.svelte
29 | } from "svelte/internal";
30 |
31 | import Waypoint from "svelte-waypoint";
| ^
32 | import { fade } from "svelte/transition";
33 | const file = "D:/languages/web/projects/svelte-todo-android/node_modules/smelte/src/components/Image/Image.svelte";
at formatError (file:///D:/languages/web/projects/svelte-todo-android/node_modules/vite/dist/node/chunks/dep-71eb12cb.js:35035:46)
at TransformContext.error (file:///D:/languages/web/projects/svelte-todo-android/node_modules/vite/dist/node/chunks/dep-71eb12cb.js:35031:19)
at normalizeUrl (file:///D:/languages/web/projects/svelte-todo-android/node_modules/vite/dist/node/chunks/dep-71eb12cb.js:40181:33)
at async TransformContext.transform (file:///D:/languages/web/projects/svelte-todo-android/node_modules/vite/dist/node/chunks/dep-71eb12cb.js:40315:47)
at async Object.transform (file:///D:/languages/web/projects/svelte-todo-android/node_modules/vite/dist/node/chunks/dep-71eb12cb.js:35284:30)
at async loadAndTransform (file:///D:/languages/web/projects/svelte-todo-android/node_modules/vite/dist/node/chunks/dep-71eb12cb.js:39812:29)
Problem
Expected Output
Compiles and allows access to Tailwind styles and Smelte components.
Actual Output
Steps to reproduce
Follow these instructions.
Environment
Operating System: Microsoft Windows 11 Pro 10.0.22000 Node.js: v16.13.1 PNPM: 6.31.0 Svelte: 3.44.0 Svelte Kit: 1.0.0-next.281 Smelte: 1.1.8