feat!: Change default publicDir to <rootDir>/public

BREAKING CHANGE: `config.publicDir`'s default changed from `<srcDir>/public` to `rootDir/<public>` to align with other frameworks and standards
This commit is contained in:
Aaron Klinker
2023-07-20 15:47:38 -05:00
parent 04e5400a46
commit 19c0948d95
7 changed files with 3 additions and 3 deletions

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before

Width:  |  Height:  |  Size: 698 B

After

Width:  |  Height:  |  Size: 698 B

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

+2 -2
View File
@@ -16,14 +16,14 @@ export interface InlineConfig {
* directory.
*
* @default
* "<root>"
* "<rootDir>"
*/
srcDir?: string;
/**
* Directory containing files that will be copied to the output directory as-is.
*
* @default
* "<srcDir>/publicDir"
* "<rootDir>/publicDir"
*/
publicDir?: string;
/**
+1 -1
View File
@@ -80,7 +80,7 @@ export async function getInternalConfig(
srcDir,
userConfig.entrypointsDir ?? 'entrypoints',
);
const publicDir = resolve(srcDir, userConfig.publicDir ?? 'public');
const publicDir = resolve(root, userConfig.publicDir ?? 'public');
const wxtDir = resolve(srcDir, '.wxt');
const typesDir = resolve(wxtDir, 'types');