Skip to content

fix(module): include nuxt-module-build prepare in prepack script #729

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

Closed
wants to merge 1 commit into from

Conversation

userquin
Copy link
Member

@userquin userquin commented Jun 3, 2024

@danielroe danielroe closed this Apr 21, 2025
@danielroe
Copy link
Member

closing as the dev:prepare script should be sufficient (though we could add pnpm dev:prepare && nuxt-module-build build if you think that would be better?)

@danielroe danielroe reopened this Apr 21, 2025
@@ -18,7 +18,7 @@
"dist"
],
"scripts": {
"prepack": "nuxt-module-build build",
"prepack": "nuxt-module-build prepare && nuxt-module-build build",
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"prepack": "nuxt-module-build prepare && nuxt-module-build build",
"prepack": "npm run dev:prepare && nuxt-module-build build",

Copy link
Member Author

Choose a reason for hiding this comment

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

I still don't understand why we need to prepare the playground to build the module, we can have multiple playgrounds.

I'll try to check your suggestion later, check my Vuetify module scripts: https://github.com/vuetifyjs/nuxt-module/blob/main/package.json#L45-L56 (I need to update the dependencies, using old @nuxt/module-builder v0.8.3).

Copy link
Member

Choose a reason for hiding this comment

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

you don't necessarily need to prepare the playground to build the module, but the 'dev:prepare' step should be run after installation. it's necessary to ensure types are correctly generated.

@danielroe danielroe closed this May 8, 2025
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.

2 participants