remove vite.config files that are split into platform files
This commit is contained in:
@@ -8,7 +8,6 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "NODE_ENV=dev vite --config vite.config.web.mts --host",
|
"dev": "NODE_ENV=dev vite --config vite.config.web.mts --host",
|
||||||
"serve": "vite preview",
|
"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": "eslint --ext .js,.ts,.vue --ignore-path .gitignore src",
|
||||||
"lint-fix": "eslint --ext .js,.ts,.vue --ignore-path .gitignore --fix 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",
|
"prebuild": "eslint --ext .js,.ts,.vue --ignore-path .gitignore src && node sw_combine.js && node scripts/copy-wasm.js",
|
||||||
|
|||||||
@@ -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'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
@@ -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']
|
|
||||||
});
|
|
||||||
Reference in New Issue
Block a user