Skip to content
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

PR #277 breaks the package #278

Closed
n4n0GH opened this issue Dec 28, 2023 · 5 comments
Closed

PR #277 breaks the package #278

n4n0GH opened this issue Dec 28, 2023 · 5 comments

Comments

@n4n0GH
Copy link

n4n0GH commented Dec 28, 2023

Please revert pull request #277 and rollback to 2.10.0 as 2.11.0 completely breaks compatibility with Vite based bundling.

Setup:

  • Vite 5.0.5
  • Svelte 4.2.3
  • Node 18

Updating the svelte-routing package to 2.11.0 kills the build process with Error: Missing "./src/history" specifier in "svelte-routing" package whereas rolling back to exactly 2.10.0 enables the build to finish. Vite dev server also only starts when adding this package to the Vite config like so:

optimizeDeps: {
    exclude: ['svelte-routing'],
  },

And quite frankly that can't be it as this also only allows the dev server to work, not the build itself.

@krishnaTORQUE
Copy link
Collaborator

krishnaTORQUE commented Dec 29, 2023

@JohnCuba please have a look.

@JohnCuba
Copy link

JohnCuba commented Jan 9, 2024

@n4n0GH can you please provide an example app where i can reproduce this?

@n4n0GH
Copy link
Author

n4n0GH commented Jan 10, 2024

@JohnCuba sure, you can clone the repo https://github.com/alchemix-finance/alchemix-v2-frontend and adjust the package.json to use the mentioned packages in my initial post. That should yield the reported behaviour.

@JohnCuba
Copy link

JohnCuba commented Jan 11, 2024

@n4n0GH The problem is not in this package, you're just import that you shouldn't. Using direct imports like package-name/src/history.js can cause many errors with bundlers.
So, i recommend you do not import files directly from libs, and if you really need these files - make PR and export them from index.js file.

@krishnaTORQUE
Copy link
Collaborator

Solution given

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants