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

[10.x] sets package.json type to module #6090

Merged
merged 1 commit into from May 4, 2023

Conversation

timacdonald
Copy link
Member

@timacdonald timacdonald commented Feb 6, 2023

@timacdonald timacdonald marked this pull request as ready for review May 3, 2023 01:54
@timacdonald timacdonald marked this pull request as draft May 3, 2023 02:27
@timacdonald timacdonald marked this pull request as ready for review May 3, 2023 03:04
@timacdonald timacdonald changed the base branch from master to 10.x May 3, 2023 23:33
@fabio-ivona
Copy link

@timacdonald after this PR, my vite livewire plugin fails to load with this error:

failed to load config from /var/www/vite.config.js
error when starting dev server:
TypeError: livewire is not a function
at file:///var/www/vite.config.js.timestamp-1685515480958-63f946afe0d4e.mjs:10:5
at ModuleJob.run (node:internal/modules/esm/module_job:194:25)

any hint on how can I solve this?

@timacdonald
Copy link
Member Author

Looks like you are building a CJS package.

You will want to build both a CJS and MJS version to support both systems.

@fabio-ivona
Copy link

I guess this is the way, was just hoping for a way to support both

thanks @timacdonald for the hint!

@timacdonald
Copy link
Member Author

@fabio-ivona you should be able to support both if you build both of those types 👍 that is what we are doing in Laravel's Vite plugin

@fabio-ivona
Copy link

yep, I'm looking at your code, I think I can do the same, thanks @timacdonald!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants