-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
esbuild-svelte: "p has already been declared" error when using @threlte/core with Svelte 5 #260
Labels
bug
Something isn't working
Comments
This comment has been minimized.
This comment has been minimized.
I’ve created this repository for reference: https://github.com/hussienliban/svelte-esbuild-test/ |
Hi I have the same issue. Here is the minimum config const esbuild = require('esbuild');
const sveltePlugin = require('esbuild-svelte');
const sveltePreprocess = require('svelte-preprocess');
esbuild.build({
entryPoints: ['src/main.ts'],
bundle: true,
outfile: 'dist/build/bundle.js',
plugins: [
sveltePlugin({
preprocess: sveltePreprocess(),
}),
],
}); ... and code // src/main.ts
import { mount } from "svelte";
import App from './App.svelte';
mount(App, { target: document.body }); <script lang="ts">
let { ...props } = $props();
</script> The error is same:
Environment:
Something I found:
|
it could be related to this sveltejs/svelte-preprocess#662 |
The root cause of this issue looks on Svelte compiler: sveltejs/svelte#15375 |
Closing as sveltejs/svelte#15375 appears to resolve this |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When building a project using @threlte/core with esbuild-svelte, multiple "p has already been declared" errors are occurring in the Canvas.svelte and T.svelte components from the @threlte/core package.
To Reproduce
Steps to reproduce the behavior:
Have a project using @threlte/core for 3D rendering in Svelte
Build the project with esbuild-svelte plugin
See multiple errors stating "p has already been declared" in:
@threlte/core/dist/Canvas.svelte
@threlte/core/dist/components/T/T.svelte
Expected behavior
The build should complete successfully without any variable redeclaration errors.
Screenshots
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: