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

building with vite #103

Merged
merged 7 commits into from
Apr 16, 2024
Merged

building with vite #103

merged 7 commits into from
Apr 16, 2024

Conversation

tpluscode
Copy link
Contributor

Replaced webpack with vite:

  • reduced bundle size
  • made dev env faster
  • knock off all current dependabot alerts

Copy link

changeset-bot bot commented Apr 10, 2024

🦋 Changeset detected

Latest commit: a0e3744

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@zazuko/spex Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Member

@ludovicm67 ludovicm67 left a comment

Choose a reason for hiding this comment

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

Great idea, looks good from what I can see.

Once it's released, I will try also to see if everything is still in order for the Trifid plugin :)

Base automatically changed from rdfjs-up to main April 10, 2024 19:10
@tpluscode
Copy link
Contributor Author

Once it's released, I will try also to see if everything is still in order for the Trifid plugin :)

Big change is that the default package export is not UMD but ESM. This should work better, with code splitting.
Also, I'm unsure about PWA...

@ludovicm67
Copy link
Member

I added @vitejs/plugin-vue as dev dependency, as I was getting the following error:

error during build:
Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@vitejs/plugin-vue' imported from …

I also made sure that the lock file includes entries for different architectures for rollup, so that we can build the app using different CPU architectures.

Copy link
Member

@ludovicm67 ludovicm67 left a comment

Choose a reason for hiding this comment

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

I did more deeper checks, and I think some changes could be great.

Once it's released, I will try also to see if everything is still in order for the Trifid plugin :)

Big change is that the default package export is not UMD but ESM. This should work better, with code splitting. Also, I'm unsure about PWA...

As I can see, it's exporting the UMD mostly like before: in dist/spex.umd.cjs (it's now with .cjs extension instead of .js).

Also, dist/style.css is the replacement for dist/spex.css.

If we want to rename those files, should we consider a major version instead of a minor one? If not, can we make sure they get the same name as before?

@tpluscode
Copy link
Contributor Author

If we want to rename those files, should we consider a major version instead of a minor one? If not, can we make sure they get the same name as before?

For 0.x versions, minor bump is considered a breaking change.

Copy link
Member

@ludovicm67 ludovicm67 left a comment

Choose a reason for hiding this comment

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

Oh yes, you are right, we are still on 0.x.
So a breaking change is that paths are also changing as reported.

LGTM.

@tpluscode
Copy link
Contributor Author

I mentioned the path changes in the changeset

@tpluscode tpluscode merged commit 29980ef into main Apr 16, 2024
2 checks passed
@tpluscode tpluscode deleted the vite branch April 16, 2024 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants