Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Create non-auto-registering routes #1450
Create non-auto-registering routes #1450
Changes from 11 commits
7bb4caa
bb01ecd
2a514c3
2dcbf70
8e94da3
6902ced
746cd0a
d6d42ce
6b8b43e
313c538
0efbeba
c71e6f8
206e3a9
b76ba9e
3c37755
f741b57
782de18
bbf5bb4
b6bcc6e
7527151
165d76e
9d746c6
47104bf
5673819
28462da
de8a28a
9230347
86246bc
c5e2195
af4780a
682f74d
206e1d3
bb6858e
8ffb396
9af7ee5
f23290e
27c8574
09182fb
64bd313
4bb7126
1329599
a46cca0
8799888
02d29f7
070f411
8a8f3f5
f35cb70
48168e8
bbce79d
23f4166
1fb8a78
d0c4d5d
676ec88
20f9340
f8fadc5
2eab6f9
138c0ad
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, thanks for your work, but the sideEffects settings here seems to break the cherry picking usage such as:
Since the
dist/components/button/button.js
also importsdist/chunks/*.js
which are not marked assideEffects
, which will be tree-shaked in production mode.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have a repo by chance?
What bundler are you using? I tested mainly with Vite, Webpack (via CRA), and Parcel.
In Stackblitz using NPM + Vite, it seems to work.
https://stackblitz.com/edit/vitejs-vite-42iegf?file=main.js,package.json,index.html&terminal=dev
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm using Webpack. But your demo is just ok to reproduce it. Try
npm run build && npm run preview
. Tree-shaking only happens in production mode by default, sonpm run dev
is not the case.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also the docs for 2.6.0 version suggest to import for bundler like so
import '@shoelace-style/shoelace/dist/components/button/button.component.js';
but by doing this you also break the dev environment.Using the same demo @KonnorRogers provided I've just changed the import for the button.
https://stackblitz.com/edit/vitejs-vite-n3cvck?file=main.js
Not sure if this is related to the problem or it's a docs error. @claviska
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Antony92 Good call on the new import docs. Its probably pulling from the manifest 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Antony92 🤔 where in the docs does it say to use the
.component.js
import? There's a note about auto-registering, but thats different.