mirror of
https://github.com/elk-zone/elk.git
synced 2024-12-12 12:58:27 +03:00
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 Inspect from 'vite-plugin-inspect'
|
||||||
import { isCI, isDevelopment } from 'std-env'
|
import { isCI, isDevelopment } from 'std-env'
|
||||||
import { isPreview } from './config/env'
|
import { isPreview } from './config/env'
|
||||||
|
@ -5,6 +6,8 @@ import { i18n } from './config/i18n'
|
||||||
import { pwa } from './config/pwa'
|
import { pwa } from './config/pwa'
|
||||||
import type { BuildInfo } from './types'
|
import type { BuildInfo } from './types'
|
||||||
|
|
||||||
|
const { resolve } = createResolver(import.meta.url)
|
||||||
|
|
||||||
export default defineNuxtConfig({
|
export default defineNuxtConfig({
|
||||||
typescript: {
|
typescript: {
|
||||||
tsConfig: {
|
tsConfig: {
|
||||||
|
@ -44,6 +47,7 @@ export default defineNuxtConfig({
|
||||||
alias: {
|
alias: {
|
||||||
'querystring': 'rollup-plugin-node-polyfills/polyfills/qs',
|
'querystring': 'rollup-plugin-node-polyfills/polyfills/qs',
|
||||||
'change-case': 'scule',
|
'change-case': 'scule',
|
||||||
|
'semver': resolve('./mocks/semver'),
|
||||||
},
|
},
|
||||||
imports: {
|
imports: {
|
||||||
dirs: [
|
dirs: [
|
||||||
|
|
Loading…
Reference in a new issue