mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-09-12 12:47:40 +02:00
Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
72401291f8 | ||
|
|
7b34314b9e | ||
|
|
b6f1cceeca | ||
|
|
c422cdac06 |
@@ -61,17 +61,14 @@
|
|||||||
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz"
|
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build-template-win": "vite build --config vite.public-template.config.js",
|
"build": "npm run version && NODE_OPTIONS=\"--max-old-space-size=8192\" vite build",
|
||||||
"build-template": "NODE_OPTIONS=\"--max-old-space-size=8192\" vite build --config vite.public-template.config.js",
|
|
||||||
"build": "npm run version && npm run build-template && NODE_OPTIONS=\"--max-old-space-size=8192\" vite build",
|
|
||||||
"build-template-watch": "NODE_OPTIONS=\"--max-old-space-size=8192\" vite build --config vite.public-template.config.js --watch",
|
|
||||||
"start-dev": "vite",
|
"start-dev": "vite",
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"preview": "vite preview",
|
"preview": "vite preview",
|
||||||
"start": "serve -s build",
|
"start": "serve -s build",
|
||||||
"version": "curl -s https://api.github.com/repos/opensignlabs/opensign/releases/latest | grep '\"tag_name\":' | awk -F '\"' '{print $4}' > ./public/version.txt",
|
"version": "curl -s https://api.github.com/repos/opensignlabs/opensign/releases/latest | grep '\"tag_name\":' | awk -F '\"' '{print $4}' > ./public/version.txt",
|
||||||
"version-win": "powershell -Command \"Invoke-RestMethod -Uri 'https://api.github.com/repos/opensignlabs/opensign/releases/latest' | Select-Object -ExpandProperty tag_name | Out-File -FilePath ./public/version.txt\"",
|
"version-win": "powershell -Command \"Invoke-RestMethod -Uri 'https://api.github.com/repos/opensignlabs/opensign/releases/latest' | Select-Object -ExpandProperty tag_name | Out-File -FilePath ./public/version.txt\"",
|
||||||
"build-win": "npm run version-win && npm run build-template-win && vite build",
|
"build-win": "npm run version-win && vite build",
|
||||||
"test": "vitest run",
|
"test": "vitest run",
|
||||||
"test:watch": "vitest",
|
"test:watch": "vitest",
|
||||||
"release": "standard-version",
|
"release": "standard-version",
|
||||||
@@ -143,4 +140,4 @@
|
|||||||
"engines": {
|
"engines": {
|
||||||
"node": "18 || 20 || 22"
|
"node": "18 || 20 || 22"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
import { defineConfig } from "vite";
|
|
||||||
import react from "@vitejs/plugin-react";
|
|
||||||
import path from "path";
|
|
||||||
import rollupNodePolyFill from "rollup-plugin-node-polyfills";
|
|
||||||
|
|
||||||
export default defineConfig({
|
|
||||||
plugins: [react()],
|
|
||||||
define: {
|
|
||||||
"process.env.NODE_ENV": JSON.stringify("production"),
|
|
||||||
process: JSON.stringify({
|
|
||||||
env: {
|
|
||||||
NODE_ENV: "production"
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
build: {
|
|
||||||
lib: {
|
|
||||||
entry: path.resolve(__dirname, "src/ee/script/PublicTemplate.jsx"),
|
|
||||||
name: "PublicTemplate",
|
|
||||||
fileName: () => `public-template.bundle.js`,
|
|
||||||
formats: ["iife"]
|
|
||||||
},
|
|
||||||
outDir: "public/static/js",
|
|
||||||
emptyOutDir: false,
|
|
||||||
assetsInlineLimit: 0,
|
|
||||||
copyPublicDir: false,
|
|
||||||
rollupOptions: {
|
|
||||||
plugins: [rollupNodePolyFill()],
|
|
||||||
output: {
|
|
||||||
// 👇 Controls how asset files (like CSS) are named
|
|
||||||
assetFileNames: (assetInfo) => {
|
|
||||||
if (assetInfo.name && assetInfo.name.endsWith(".css")) {
|
|
||||||
return "public-template.bundle.css"; // Custom CSS filename
|
|
||||||
}
|
|
||||||
return "[name].[ext]";
|
|
||||||
},
|
|
||||||
globals: {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
Reference in New Issue
Block a user