fix: separate firefox dev and build scripts

This commit is contained in:
sethburkart123
2024-06-16 08:14:51 +10:00
parent cbbd1c913c
commit a1582b0e74
2 changed files with 8 additions and 2 deletions
+5 -1
View File
@@ -2,18 +2,22 @@ import { defineConfig } from 'vite';
import { join } from 'path';
import manifest from './manifest.json';
import firefoxManifest from './manifest.firefox.json';
import react from '@vitejs/plugin-react-swc';
//import MillionLint from '@million/lint';
import { crx } from '@crxjs/vite-plugin';
import million from "million/compiler";
const isFirefox = process.env.VITE_TARGET === 'firefox';
const plugins = [
react(),
million.vite({ auto: true }),
//MillionLint.vite(), /* enable for testing and debugging performance */
crx({
manifest
manifest: isFirefox ? firefoxManifest : manifest,
browser: isFirefox ? 'firefox' : 'chrome'
})
];