perf: mock semver import (#1006)
parent
dcec32338c
commit
32aa47e701
|
@ -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 New Issue