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

Change "svelte" path in package.json in root during dev and in package dir after npm run package #2242

Closed
frederikhors opened this issue Aug 18, 2021 · 1 comment
Labels
feature request New feature or request pkg:svelte-package Issues related to svelte-package
Milestone

Comments

@frederikhors
Copy link
Contributor

frederikhors commented Aug 18, 2021

Describe the problem

When developing a package I would like to have "svelte": "src/lib/index.ts" in my package.json (using it with npm link) but when I build I would like it changed to "svelte": "index.js" in package dir.

Is this already possible and I don't know?

I'm using "@sveltejs/kit": "1.0.0-next.153" with it skeleton project.

Describe the proposed solution

Transform that path in package.json during npm run package.

Importance

would make my life easier

@benmccann benmccann added the pkg:svelte-package Issues related to svelte-package label Aug 18, 2021
@ignatiusmb ignatiusmb added feature request New feature or request p3-edge-case SvelteKit cannot be used in an uncommon way labels Sep 3, 2021
@Rich-Harris Rich-Harris added this to the 1.0 milestone Apr 26, 2022
@benmccann benmccann modified the milestones: 1.0, post-1.0 Jul 27, 2022
@benmccann benmccann removed the p3-edge-case SvelteKit cannot be used in an uncommon way label Jul 27, 2022
dummdidumm added a commit that referenced this issue Jan 31, 2023
- closes #7258
- closes #6824
- closes #4828
- part of #2242
- better message for #2884
@dummdidumm
Copy link
Member

We decided to not implement something like this. Instead, the package.json in the root will now be used as-is. If you don't need a compile step (not using TS/SCSS/etc) then you can just point your files at the source. Else you'd need to use svelte-package --watch or write your own script to create a generated package.json.

@dummdidumm dummdidumm closed this as not planned Won't fix, can't repro, duplicate, stale Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request pkg:svelte-package Issues related to svelte-package
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants