diff --git a/build.config.ts b/build.config.ts index 1cacdf24..e64a2ab0 100644 --- a/build.config.ts +++ b/build.config.ts @@ -11,7 +11,7 @@ export default defineBuildConfig({ delimiters: ['', ''], values: { // Used in development to import directly from theme - 'const isUiDev = true': 'const isUiDev = false' + 'process.argv.includes(\'--uiDev\')': 'false' } } }, diff --git a/package.json b/package.json index 61b53d9e..bc9a9998 100644 --- a/package.json +++ b/package.json @@ -96,12 +96,12 @@ "scripts": { "build": "nuxt-module-build build", "prepack": "pnpm build", - "dev": "nuxi dev playground", + "dev": "nuxi dev playground --uiDev", "dev:build": "nuxi build playground", - "dev:vue": "vite playground-vue", + "dev:vue": "vite playground-vue -- --uiDev", "dev:vue:build": "vite build playground-vue", "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground && nuxi prepare docs && vite build playground-vue", - "docs": "nuxi dev docs", + "docs": "nuxi dev docs --uiDev", "docs:build": "nuxi build docs", "docs:prepare": "nuxt-component-meta docs", "lint": "eslint .", diff --git a/src/templates.ts b/src/templates.ts index 47b9c505..a130f083 100644 --- a/src/templates.ts +++ b/src/templates.ts @@ -51,8 +51,7 @@ export function getTemplates(options: ModuleOptions, uiConfig: Record