mirror of
https://github.com/planetrenox/inzerosight.git
synced 2026-09-18 10:05:44 +00:00
Use vite --mode for target selection
This commit is contained in:
@@ -4,10 +4,10 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "TARGET=firefox vite",
|
"dev": "vite --mode chrome",
|
||||||
"build:web": "TARGET=web vite build",
|
"build:web": "vite build --mode web",
|
||||||
"build:firefox": "TARGET=firefox vite build",
|
"build:firefox": "vite build --mode firefox",
|
||||||
"build:chrome": "TARGET=chrome vite build",
|
"build:chrome": "vite build --mode chrome",
|
||||||
"build": "bun run build:firefox && bun run build:chrome"
|
"build": "bun run build:firefox && bun run build:chrome"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
import { defineConfig } from 'vite';
|
import { defineConfig } from 'vite';
|
||||||
import fs from 'node:fs';
|
import fs from 'node:fs';
|
||||||
|
|
||||||
const target = process.env.TARGET || 'firefox';
|
export default defineConfig(async ({ mode }) => {
|
||||||
|
const target = process.env.TARGET || (['chrome', 'firefox', 'web'].includes(mode) ? mode : 'chrome');
|
||||||
export default defineConfig(async () => {
|
|
||||||
const plugins = [];
|
const plugins = [];
|
||||||
|
|
||||||
if (target !== 'web') {
|
if (target !== 'web') {
|
||||||
|
|||||||
Reference in New Issue
Block a user