Use @-imports in TS runtime code (#50470)
Co-authored-by: Robert Sese <734194+rsese@users.noreply.github.com>
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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()
|
||||||
|
|||||||
@@ -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',
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user