chore(deps): use npm nostr-tools instead of JSR @nostr/tools
- Replace "npm:@jsr/nostr__tools" with "nostr-tools" to fix npm 404 - Update imports in NewEditProjectView and Vite configs - Remove Vite aliases so resolution uses package exports
This commit is contained in:
@@ -2438,7 +2438,7 @@ export async function createBuildConfig(platform: string): Promise<UserConfig> {
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': path.resolve(__dirname, 'src'),
|
||||
'@nostr/tools': path.resolve(__dirname, 'node_modules/@nostr/tools'),
|
||||
'nostr-tools': path.resolve(__dirname, 'node_modules/nostr-tools'),
|
||||
'path': path.resolve(__dirname, './src/utils/node-modules/path.js'),
|
||||
'fs': path.resolve(__dirname, './src/utils/node-modules/fs.js'),
|
||||
'crypto': path.resolve(__dirname, './src/utils/node-modules/crypto.js'),
|
||||
@@ -2447,7 +2447,7 @@ export async function createBuildConfig(platform: string): Promise<UserConfig> {
|
||||
},
|
||||
optimizeDeps: {
|
||||
include: [
|
||||
'@nostr/tools',
|
||||
'nostr-tools',
|
||||
'@jlongster/sql.js',
|
||||
'absurd-sql',
|
||||
// ... additional dependencies
|
||||
@@ -2472,7 +2472,7 @@ export async function createBuildConfig(platform: string): Promise<UserConfig> {
|
||||
**Path Aliases**:
|
||||
|
||||
- `@`: Points to `src/` directory
|
||||
- `@nostr/tools`: Nostr tools library
|
||||
- `nostr-tools`: Nostr tools library
|
||||
- `path`, `fs`, `crypto`: Node.js polyfills for browser
|
||||
|
||||
### B.2 vite.config.web.mts
|
||||
@@ -2612,7 +2612,7 @@ export default defineConfig(async () => {
|
||||
output: {
|
||||
manualChunks: {
|
||||
vendor: ["vue", "vue-router", "@vueuse/core"],
|
||||
crypto: ["@nostr/tools", "crypto-js"],
|
||||
crypto: ["nostr-tools", "crypto-js"],
|
||||
ui: ["@fortawesome/vue-fontawesome"]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user