1
0
mirror of synced 2025-12-19 18:10:59 -05:00

Use @-imports in TS runtime code (#50470)

Co-authored-by: Robert Sese <734194+rsese@users.noreply.github.com>
This commit is contained in:
Peter Bengtsson
2024-05-06 16:07:34 -04:00
committed by GitHub
parent 529f4a8c36
commit b6f0084e38
3 changed files with 7 additions and 1 deletions

View File

@@ -93,6 +93,7 @@ COPY --chown=node:node .remotejson-cache* ./.remotejson-cache
COPY --chown=node:node .pageinfo-cache.json.br* ./.pageinfo-cache.json.br COPY --chown=node:node .pageinfo-cache.json.br* ./.pageinfo-cache.json.br
COPY --chown=node:node data ./data COPY --chown=node:node data ./data
COPY --chown=node:node next.config.js ./ COPY --chown=node:node next.config.js ./
COPY --chown=node:node tsconfig.json ./
EXPOSE $PORT EXPOSE $PORT

View File

@@ -1,5 +1,5 @@
import express from 'express' import express from 'express'
import middleware from '../middleware/index.js' import middleware from '@/frame/middleware/index.js'
function createApp() { function createApp() {
const app = express() const app = express()

View File

@@ -5,6 +5,11 @@ export default {
exclude: ['**/tests/playwright-*.spec.ts'], exclude: ['**/tests/playwright-*.spec.ts'],
// Default is `!process.env.CI` // Default is `!process.env.CI`
watch: false, watch: false,
// vitest doesn't account for tsconfig.json `paths` settings so we have to
// manually set this alias to resolve our TS @-imports
alias: {
'@/': new URL('./src/', import.meta.url).pathname,
},
globalSetup: './src/tests/vitest.setup.ts', globalSetup: './src/tests/vitest.setup.ts',
}, },