-
Notifications
You must be signed in to change notification settings - Fork 32
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
[Bug] dist/preset.js doesn't exist #6
Comments
@phated this come from the default addon-kit. |
Probably a bug in the addon-kit cc @winkerVSbecks |
Follow-up: I have found a rather strange issue. At least it seems strange to me, maybe I haven't investigated enough.
I suspect that I can configure Snowpack to ignore the However, I thought I should mention the issue I'm seeing. I don't understand why the Storybook startup suddenly has this trouble about resolving |
can you try with a field Your story use an import from |
Hi @j3rem1e ,
I assume you mean in However, I still don't understand what the point is of referring to an invalid (non-existent) file in Anyway - with the |
@oliversturm, @j3rem1e Did you perhaps forget to run build before publishing it? |
@winkerVSbecks Yes, |
@oliversturm when in webpack (and probably in snowpack then) you do "import 'xxx'", it checks the package.json do know what file it should load. if nothing is specified, it returns the root index.js, otherwise, in a browser, it checks the "browser" property then the "main" property, and in the server, it checks the "node" property, then the "main" property.
@winkerVSbecks I didn't publish anything, I don't think I have the right to publish something to the storybook scope :) |
@j3rem1e right, thanks for clarifying. Yea, that indeed is a bug from the addon kit. I'll update it to use |
Agreed, that's what I found. But when I change it to I think setting the |
Describe the bug
The
main
item inpackage.json
refers todist/preset.js
- but this does not exist, the correct name isdist/preset/index.js
.I noticed this in my Svelte/Snowpack based project, since Snowpack was complaining about the missing file during it's dependency building step. I worked around by manually changing the entry to
dist/preset/index.js
(or justdist/preset
, this works as well) and then Snowpack is happy.The text was updated successfully, but these errors were encountered: