Nuxt 2 is reaching End-of-Life on June 30th, 2024.

nuxi build-module

Nuxt command to build your Nuxt module before publishing.
Terminal
npx nuxi build-module [--stub] [rootDir]

The build-module command runs @nuxt/module-builder to generate dist directory within your rootDir that contains the full build for your nuxt-module.

OptionDefaultDescription
rootDir.The root directory of the module to bundle.
--stubfalseStub out your module for development using jiti. (note: This is mainly for development purposes.)
Read more about @nuxt/module-builder.