Skip to content

Commit eb55ea3

Browse files
committed
chore: idk
1 parent ddd84a9 commit eb55ea3

File tree

3 files changed

+31
-17
lines changed

3 files changed

+31
-17
lines changed

nuxt.config.ts

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
import { execSync } from 'node:child_process'
22
import { readFileSync } from 'node:fs'
3+
import { dirname, join } from 'node:path'
34
import process from 'node:process'
45
import { fileURLToPath } from 'node:url'
56
import virtual from '@rollup/plugin-virtual'
67
import { consola } from 'consola'
78
import topLevelAwait from 'vite-plugin-top-level-await'
89
import wasm from 'vite-plugin-wasm'
910

10-
const packageJsonPath = fileURLToPath(new URL('./package.json', import.meta.url))
11+
// Use absolute paths to avoid deployment issues
12+
const __dirname = dirname(fileURLToPath(import.meta.url))
13+
const packageJsonPath = join(__dirname, 'package.json')
1114
const packageJsonContent = readFileSync(packageJsonPath, 'utf8')
1215
const { description, name, version } = JSON.parse(packageJsonContent)
1316

@@ -150,20 +153,13 @@ export default defineNuxtConfig({
150153
],
151154
},
152155

153-
// // https://github.com/csstree/csstree/issues/314
154-
// externals: {
155-
// // Add data directory to externals to ensure JSON files are included
156-
// inline: ['./data'],
157-
// },
158-
// // https://github.com/csstree/csstree/issues/314
159-
// publicAssets: [
160-
// // Make data files accessible as public assets
161-
// {
162-
// dir: 'data',
163-
// baseURL: '/data',
164-
// maxAge: 60 * 60 * 24 * 7, // 1 week
165-
// },
166-
// ],
156+
// Include node_modules and package.json in the bundle
157+
externals: {
158+
inline: ['./node_modules', './package.json'],
159+
},
160+
161+
// Properly resolve local files during build
162+
moduleSideEffects: ['nimiq-validator-trustscore'],
167163
},
168164

169165
compatibilityDate: '2025-03-21',

server/tsconfig.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
11
{
2-
"extends": "../.nuxt/tsconfig.server.json"
2+
"extends": "../.nuxt/tsconfig.server.json",
3+
"compilerOptions": {
4+
"baseUrl": "..",
5+
"paths": {
6+
"~/*": ["../*"],
7+
"@/*": ["../*"]
8+
},
9+
"resolveJsonModule": true,
10+
"esModuleInterop": true
11+
}
312
}

tsconfig.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
{
22
// https://nuxt.com/docs/guide/concepts/typescript
3-
"extends": "./.nuxt/tsconfig.json"
3+
"extends": "./.nuxt/tsconfig.json",
4+
"compilerOptions": {
5+
"baseUrl": ".",
6+
"paths": {
7+
"~/*": ["./*"],
8+
"@/*": ["./*"]
9+
},
10+
"resolveJsonModule": true,
11+
"esModuleInterop": true
12+
}
413
}

0 commit comments

Comments
 (0)