fix!: Add suffix to non-production output directories (#1086)
This commit is contained in:
@@ -104,13 +104,15 @@ export async function resolveConfig(
|
||||
production: '',
|
||||
development: '-dev',
|
||||
};
|
||||
const modeSuffix = modeSuffixes[mode] ?? `-${mode}`;
|
||||
const outDirTemplate = (
|
||||
mergedConfig.outDirTemplate ?? `${browser}-mv${manifestVersion}`
|
||||
mergedConfig.outDirTemplate ??
|
||||
`${browser}-mv${manifestVersion}${modeSuffix}`
|
||||
)
|
||||
// Resolve all variables in the template
|
||||
.replaceAll('{{browser}}', browser)
|
||||
.replaceAll('{{manifestVersion}}', manifestVersion.toString())
|
||||
.replaceAll('{{modeSuffix}}', modeSuffixes[mode] ?? `-${mode}`)
|
||||
.replaceAll('{{modeSuffix}}', modeSuffix)
|
||||
.replaceAll('{{mode}}', mode)
|
||||
.replaceAll('{{command}}', command);
|
||||
|
||||
|
||||
@@ -63,8 +63,8 @@ export interface InlineConfig {
|
||||
* - <span v-pre>`{{modeSuffix}}`</span>: A suffix based on the mode ('-dev' for development, '' for production)
|
||||
* - <span v-pre>`{{command}}`</span>: The WXT command being run (e.g., 'build', 'serve')
|
||||
*
|
||||
* @example "{{browser}}-mv{{manifestVersion}}{{modeSuffix}}"
|
||||
* @default <span v-pre>`"{{browser}}-mv{{manifestVersion}}"`</span>
|
||||
* @example "{{browser}}-mv{{manifestVersion}}"
|
||||
* @default <span v-pre>`"{{browser}}-mv{{manifestVersion}}{{modeSuffix}}"`</span>
|
||||
*/
|
||||
outDirTemplate?: string;
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user