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

Replace rollup with vite configuration #1364

Merged
merged 8 commits into from
Jan 23, 2025

Conversation

Hristo313
Copy link
Contributor

@Hristo313 Hristo313 commented Jan 13, 2025

Closes #1052

Remove rollup for web components projects and add vite configuration.
Update versions of typescript, concurrently, rimraf, tslib, lit.

@coveralls
Copy link

coveralls commented Jan 13, 2025

Coverage Status

coverage: 70.041%. remained the same
when pulling 070817a on hhristov/replace-rollup-with-vite
into 1af70f5 on master.

@Hristo313 Hristo313 requested a review from rkaraivanov January 14, 2025 09:57
@rkaraivanov
Copy link
Member

@Hristo313 @Lipata

IMO you assuming this is going to be a Lit based application I highly recommend mimicking what the default Vite lit-ts template is doing.

Most of the plugins the package enforces are opt-in and it should be up to the user to add and configure based on their specific use-case.

@rkaraivanov
Copy link
Member

Also, sticking to ES2021 and ESM output is an acceptable default option.

The web components package targets evergreen browsers and ES2021 is a nice baseline which the relevant browsers already cover.
Anything beyond that is up to user provided configuration based on their scenario.

Hristo Hristov added 2 commits January 21, 2025 15:41
…s2022, remove vite html plugin and vite plugin babel from the configuration, update vite to 6.0.10
@Hristo313 Hristo313 requested a review from Lipata January 22, 2025 09:39
Lipata
Lipata previously approved these changes Jan 22, 2025
@@ -14,7 +14,7 @@
},
"scripts": {
"start": "tsc && concurrently -k -r \"tsc --watch\" \"wds\"",
"build": "rimraf dist && tsc && node --max-old-space-size=4096 node_modules/rollup/dist/bin/rollup -c rollup.config.mjs",
"build": "rimraf dist && tsc && node --max-old-space-size=4096 node_modules/vite/bin/vite.js build",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Misaligned

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tested a new empty WC project with all components. All work with the exception of the navbar. It seems it has a wrong import
image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem is reproduced in the master branch, so it's not related to this PR.

@Lipata
Copy link
Member

Lipata commented Jan 22, 2025

@IvayloG the problem with the nav-drawer is fixed.

@Lipata Lipata merged commit 024ee5f into master Jan 23, 2025
3 checks passed
@Lipata Lipata deleted the hhristov/replace-rollup-with-vite branch January 23, 2025 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix the WC project not getting tree-shaking with rollup (or move to webpack / other module bundler)
5 participants