使用public目录替代复制静态资源的配置

This commit is contained in:
Seven Chord 2024-01-14 14:52:04 +08:00
parent 6f8ae4dcd3
commit e6a7277f8a
6 changed files with 2 additions and 19 deletions

View file

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before After
Before After

View file

@ -30,23 +30,7 @@ export default defineConfig({
{
src: "./README*.md",
dest: "./",
},
{
src: "./icon.png",
dest: "./",
},
{
src: "./preview.png",
dest: "./",
},
{
src: "./plugin.json",
dest: "./",
},
{
src: "./src/i18n/**",
dest: "./i18n/",
},
}
],
}),
],
@ -91,9 +75,8 @@ export default defineConfig({
name: 'watch-external',
async buildStart() {
const files = await fg([
'src/i18n/*.json',
'public/**',
'./README*.md',
'./plugin.json'
]);
for (let file of files) {
this.addWatchFile(file);