Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions packages/wxt/src/core/resolve-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,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);

Expand Down
4 changes: 2 additions & 2 deletions packages/wxt/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,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;
/**
Expand Down