diff --git a/package.json b/package.json index 033f596e..60405826 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,6 @@ "scripts": { "dev": "NODE_ENV=dev vite --config vite.config.web.mts --host", "serve": "vite preview", - "build": "VITE_GIT_HASH=`git log -1 --pretty=format:%h` vite build --config vite.config.mts", "lint": "eslint --ext .js,.ts,.vue --ignore-path .gitignore src", "lint-fix": "eslint --ext .js,.ts,.vue --ignore-path .gitignore --fix src", "prebuild": "eslint --ext .js,.ts,.vue --ignore-path .gitignore src && node sw_combine.js && node scripts/copy-wasm.js", diff --git a/vite.config.mts b/vite.config.mts deleted file mode 100644 index 3aa22ce0..00000000 --- a/vite.config.mts +++ /dev/null @@ -1,71 +0,0 @@ -import { defineConfig } from "vite"; -import vue from "@vitejs/plugin-vue"; -import path from "path"; -import { fileURLToPath } from 'url'; - -const __dirname = path.dirname(fileURLToPath(import.meta.url)); - -export default defineConfig({ - plugins: [vue()], - resolve: { - alias: { - '@': path.resolve(__dirname, './src'), - 'nostr-tools': path.resolve(__dirname, 'node_modules/nostr-tools'), - 'nostr-tools/nip06': path.resolve(__dirname, 'node_modules/nostr-tools/nip06'), - 'nostr-tools/core': path.resolve(__dirname, 'node_modules/nostr-tools/core'), - stream: 'stream-browserify', - util: 'util', - crypto: 'crypto-browserify', - assert: 'assert/', - http: 'stream-http', - https: 'https-browserify', - url: 'url/', - zlib: 'browserify-zlib', - path: 'path-browserify', - fs: false, - tty: 'tty-browserify', - net: false, - dns: false, - child_process: false, - os: false - }, - mainFields: ['module', 'jsnext:main', 'jsnext', 'main'], - }, - optimizeDeps: { - include: ['nostr-tools', 'nostr-tools/nip06', 'nostr-tools/core'], - esbuildOptions: { - define: { - global: 'globalThis' - } - } - }, - build: { - sourcemap: true, - target: 'esnext', - chunkSizeWarningLimit: 1000, - commonjsOptions: { - include: [/node_modules/], - transformMixedEsModules: true - }, - rollupOptions: { - external: [ - 'stream', 'util', 'crypto', 'http', 'https', 'url', 'zlib', - 'path', 'fs', 'tty', 'assert', 'net', 'dns', 'child_process', 'os' - ], - output: { - globals: { - stream: 'stream', - util: 'util', - crypto: 'crypto', - http: 'http', - https: 'https', - url: 'url', - zlib: 'zlib', - path: 'path', - assert: 'assert', - tty: 'tty' - } - } - } - } -}); \ No newline at end of file diff --git a/vite.config.ts b/vite.config.ts deleted file mode 100644 index 61a62e08..00000000 --- a/vite.config.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { defineConfig } from "vite"; -import vue from "@vitejs/plugin-vue"; -import path from "path"; - -export default defineConfig({ - plugins: [vue()], - server: { - headers: { - 'Cross-Origin-Opener-Policy': 'same-origin', - 'Cross-Origin-Embedder-Policy': 'require-corp' - } - }, - resolve: { - alias: { - '@': path.resolve(__dirname, './src'), - 'nostr-tools': path.resolve(__dirname, 'node_modules/nostr-tools'), - 'nostr-tools/nip06': path.resolve(__dirname, 'node_modules/nostr-tools/nip06'), - 'nostr-tools/core': path.resolve(__dirname, 'node_modules/nostr-tools/core'), - stream: 'stream-browserify', - util: 'util', - crypto: 'crypto-browserify' - }, - mainFields: ['module', 'jsnext:main', 'jsnext', 'main'], - }, - optimizeDeps: { - include: ['nostr-tools', 'nostr-tools/nip06', 'nostr-tools/core', '@jlongster/sql.js'], - esbuildOptions: { - define: { - global: 'globalThis' - } - } - }, - build: { - sourcemap: true, - target: 'esnext', - chunkSizeWarningLimit: 1000, - commonjsOptions: { - include: [/node_modules/], - transformMixedEsModules: true - }, - rollupOptions: { - external: ['stream', 'util', 'crypto'], - output: { - globals: { - stream: 'stream', - util: 'util', - crypto: 'crypto' - } - } - } - }, - assetsInclude: ['**/*.wasm'] -}); \ No newline at end of file