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

[BUG] Manifest is created in wrong directory after build #80

Open
j7-dev opened this issue Feb 18, 2024 · 1 comment
Open

[BUG] Manifest is created in wrong directory after build #80

j7-dev opened this issue Feb 18, 2024 · 1 comment

Comments

@j7-dev
Copy link

j7-dev commented Feb 18, 2024

Hello,

I am grateful for your contributions. 🙏

I found a bug after I run `yarn build‵

Problem in "kucrut/vite-for-wp": "^0.8.0"

manifest.json will be created in dist/.vite directory which is WRONG

image

function get_manifest will try to find the manifest file in __DIR__ . '/js/dist', NOT in __DIR__ . '/js/dist/.vite'

That will cause an error, lead to empty assets, so the built js won't be enqueue.

No problem in "kucrut/vite-for-wp": "^0.5.2"

image


Update

It seems the manifest.json will be created in dist/.vite in vite 5

reference
nystudio107/craft-vite#77
https://www.drupal.org/project/vite/issues/3401054

@j7-dev
Copy link
Author

j7-dev commented Apr 2, 2024

I resolve this with this commonJS temporary.

move dist/.vite/manifest.json to dist/manifest.json

https://github.com/j7-dev/wp-react-plugin/blob/master/release/mv-manifest.cjs

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

No branches or pull requests

1 participant