-
Notifications
You must be signed in to change notification settings - Fork 21
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
feat: update to rollup 4 #1370
feat: update to rollup 4 #1370
Conversation
@@ -30,7 +30,7 @@ | |||
"./tests/**/*", | |||
"**/*.scss", | |||
"**/*.scss.js", | |||
"**/*vue_styles.*.vue.js", | |||
"**/*vue[0-9].js", |
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.
Due to how rollup generates now the output filenames when preserving modules, we need to adjust the sideEffect field in the package.json so bundlers do not tree shake styles of vue components.
The rollup-plugin-vue splits every vue sfc into two virtual files. Taking for example the redirection.vue component:
redirection.vue?rollup-plugin-vue=script.ts
redirection.vue?rollup-plugin-vue=styles.0.css
Prior to v3 rollup generates three files:
redirection.vue.js
redirection.vue_rollup_plugin-vue_script.vue.js
redirection.vue_rollup_plugin-vue_styles.0.js.
However, now rollup will name those files:
redirection.vue.js
redirection.vue.2.js
redirection.vue.3.js
You can see a simple example using the rollup repl
@diegopf great job!! Tested in archetype & everything is working fine. The warnings mentioned don't break the build process. Here is just a minor doubt I have:
|
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.
iep! We forgot this one!
output: [{ format: 'esm', dir: resolve(__dirname, '../showcase'), preserveModules: true }],
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.
🎉
Tested x-components library
Tested x-tailwind library
Tested all inside archetype
Just found some warns in x-types, which are not new nor related to this task (so these should be handled in another task -small-)
All fine 💯
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.
🚀
This PR updates rollup to the latest version which will help us in the transition from rollup to vite in the future.
The biggest changes are:
In order to test this changes you should make a
pnpm install --frozen-lockfile
which will trigger the build for every package in the monorepo with the new rollup version. Afterwards, you can use the archetype and install locally the new versions and see if everything is still working as expected.