mirror of
https://github.com/planetrenox/inzerosight.git
synced 2026-03-17 03:01:02 +00:00
Fix: explicitly copy icon_500.png to dist target
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import { defineConfig } from 'vite';
|
import { defineConfig } from 'vite';
|
||||||
|
import fs from 'node:fs';
|
||||||
|
|
||||||
const target = process.env.TARGET || 'firefox';
|
const target = process.env.TARGET || 'firefox';
|
||||||
|
|
||||||
@@ -52,6 +53,16 @@ export default defineConfig(async () => {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Custom plugin to ensure the icon is always copied to the target output directory
|
||||||
|
plugins.push({
|
||||||
|
name: 'copy-icon',
|
||||||
|
writeBundle() {
|
||||||
|
if (fs.existsSync('icon_500.png')) {
|
||||||
|
fs.copyFileSync('icon_500.png', `dist/${target}/icon_500.png`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
build: {
|
build: {
|
||||||
outDir: `dist/${target}`,
|
outDir: `dist/${target}`,
|
||||||
|
|||||||
Reference in New Issue
Block a user