forked from Mirrors/elk
perf: mock semver import (#1006)
This commit is contained in:
parent
dcec32338c
commit
32aa47e701
2 changed files with 11 additions and 0 deletions
7
mocks/semver.ts
Normal file
7
mocks/semver.ts
Normal file
|
@ -0,0 +1,7 @@
|
|||
import proxy from 'unenv/runtime/mock/proxy'
|
||||
|
||||
export const lt = proxy
|
||||
export const gt = proxy
|
||||
export const gte = proxy
|
||||
export const satisfies = proxy
|
||||
export class SemVer {}
|
|
@ -1,3 +1,4 @@
|
|||
import { createResolver } from '@nuxt/kit'
|
||||
import Inspect from 'vite-plugin-inspect'
|
||||
import { isCI, isDevelopment } from 'std-env'
|
||||
import { isPreview } from './config/env'
|
||||
|
@ -5,6 +6,8 @@ import { i18n } from './config/i18n'
|
|||
import { pwa } from './config/pwa'
|
||||
import type { BuildInfo } from './types'
|
||||
|
||||
const { resolve } = createResolver(import.meta.url)
|
||||
|
||||
export default defineNuxtConfig({
|
||||
typescript: {
|
||||
tsConfig: {
|
||||
|
@ -44,6 +47,7 @@ export default defineNuxtConfig({
|
|||
alias: {
|
||||
'querystring': 'rollup-plugin-node-polyfills/polyfills/qs',
|
||||
'change-case': 'scule',
|
||||
'semver': resolve('./mocks/semver'),
|
||||
},
|
||||
imports: {
|
||||
dirs: [
|
||||
|
|
Loading…
Reference in a new issue