chore: remove legacy querystring alias and its polyfills (#3517)
This commit is contained in:
parent
1b34059321
commit
f4895d5457
3 changed files with 23 additions and 82 deletions
|
|
@ -8,7 +8,9 @@ import { pwa } from './config/pwa'
|
|||
|
||||
const { resolve } = createResolver(import.meta.url)
|
||||
|
||||
const mockProxy = resolveModulePath('mocked-exports/proxy', { from: import.meta.url })
|
||||
const mockProxy = resolveModulePath('mocked-exports/proxy', {
|
||||
from: import.meta.url,
|
||||
})
|
||||
|
||||
export default defineNuxtConfig({
|
||||
compatibilityDate: '2025-07-11',
|
||||
|
|
@ -33,10 +35,10 @@ export default defineNuxtConfig({
|
|||
'@nuxtjs/i18n',
|
||||
// temporary disable module during test
|
||||
// ref. https://github.com/nuxt-modules/color-mode/issues/335
|
||||
...isTest ? [] : ['@nuxtjs/color-mode'],
|
||||
...(isTest ? [] : ['@nuxtjs/color-mode']),
|
||||
'@unlazy/nuxt',
|
||||
'@nuxt/test-utils/module',
|
||||
...(isDevelopment || isWindows) ? [] : ['nuxt-security'],
|
||||
...(isDevelopment || isWindows ? [] : ['nuxt-security']),
|
||||
],
|
||||
vue: {
|
||||
propsDestructure: true,
|
||||
|
|
@ -71,7 +73,6 @@ export default defineNuxtConfig({
|
|||
'~/styles/dropdown.css',
|
||||
],
|
||||
alias: {
|
||||
'querystring': 'rollup-plugin-node-polyfills/polyfills/qs',
|
||||
'change-case': 'scule',
|
||||
'semver': resolve('./mocks/semver'),
|
||||
},
|
||||
|
|
@ -82,17 +83,20 @@ export default defineNuxtConfig({
|
|||
'./composables/settings',
|
||||
'./composables/tiptap/index.ts',
|
||||
],
|
||||
imports: [{
|
||||
name: 'useI18n',
|
||||
from: '~/utils/i18n',
|
||||
priority: 100,
|
||||
}],
|
||||
imports: [
|
||||
{
|
||||
name: 'useI18n',
|
||||
from: '~/utils/i18n',
|
||||
priority: 100,
|
||||
},
|
||||
],
|
||||
injectAtEnd: true,
|
||||
},
|
||||
vite: {
|
||||
define: {
|
||||
'process.env.VSCODE_TEXTMATE_DEBUG': 'false',
|
||||
'process.mock': ((!isCI || isPreview) && process.env.MOCK_USER) || 'false',
|
||||
'process.mock':
|
||||
((!isCI || isPreview) && process.env.MOCK_USER) || 'false',
|
||||
'process.test': 'false',
|
||||
},
|
||||
build: {
|
||||
|
|
@ -227,15 +231,15 @@ export default defineNuxtConfig({
|
|||
'nitro:config': function (config) {
|
||||
const nuxt = useNuxt()
|
||||
config.virtual = config.virtual || {}
|
||||
config.virtual['#storage-config'] = `export const driver = ${JSON.stringify(nuxt.options.appConfig.storage.driver)}`
|
||||
config.virtual['#storage-config']
|
||||
= `export const driver = ${JSON.stringify(nuxt.options.appConfig.storage.driver)}`
|
||||
},
|
||||
'vite:extendConfig': function (config, { isServer }) {
|
||||
if (isServer) {
|
||||
const alias = config.resolve!.alias as Record<string, string>
|
||||
for (const dep of ['eventemitter3', 'isomorphic-ws'])
|
||||
alias[dep] = resolve('./mocks/class')
|
||||
for (const dep of ['fuse.js'])
|
||||
alias[dep] = mockProxy
|
||||
for (const dep of ['fuse.js']) alias[dep] = mockProxy
|
||||
const resolver = createResolver(import.meta.url)
|
||||
|
||||
config.plugins!.unshift({
|
||||
|
|
@ -250,7 +254,12 @@ export default defineNuxtConfig({
|
|||
})
|
||||
|
||||
const noExternal = config.ssr!.noExternal as string[]
|
||||
noExternal.push('masto', '@fnando/sparkline', 'vue-i18n', '@mastojs/ponyfills')
|
||||
noExternal.push(
|
||||
'masto',
|
||||
'@fnando/sparkline',
|
||||
'vue-i18n',
|
||||
'@mastojs/ponyfills',
|
||||
)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -86,7 +86,6 @@
|
|||
"file-saver": "^2.0.5",
|
||||
"floating-vue": "^5.2.2",
|
||||
"focus-trap": "^7.5.1",
|
||||
"form-data": "^4.0.0",
|
||||
"fuse.js": "^7.0.0",
|
||||
"github-reserved-names": "^2.0.4",
|
||||
"happy-dom": "^20.0.0",
|
||||
|
|
@ -107,7 +106,6 @@
|
|||
"prosemirror-highlight": "^0.13.0",
|
||||
"prosemirror-state": "^1.4.3",
|
||||
"punycode": "^2.3.1",
|
||||
"rollup-plugin-node-polyfills": "^0.2.1",
|
||||
"shiki": "^3.20.0",
|
||||
"simple-git": "^3.19.1",
|
||||
"slimeform": "^0.10.0",
|
||||
|
|
|
|||
|
|
@ -173,9 +173,6 @@ importers:
|
|||
focus-trap:
|
||||
specifier: ^7.5.1
|
||||
version: 7.6.5
|
||||
form-data:
|
||||
specifier: ^4.0.0
|
||||
version: 4.0.4
|
||||
fuse.js:
|
||||
specifier: ^7.0.0
|
||||
version: 7.1.0
|
||||
|
|
@ -236,9 +233,6 @@ importers:
|
|||
punycode:
|
||||
specifier: ^2.3.1
|
||||
version: 2.3.1
|
||||
rollup-plugin-node-polyfills:
|
||||
specifier: ^0.2.1
|
||||
version: 0.2.1
|
||||
shiki:
|
||||
specifier: ^3.20.0
|
||||
version: 3.20.0
|
||||
|
|
@ -5292,9 +5286,6 @@ packages:
|
|||
async@3.2.6:
|
||||
resolution: {integrity: sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==}
|
||||
|
||||
asynckit@0.4.0:
|
||||
resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==}
|
||||
|
||||
at-least-node@1.0.0:
|
||||
resolution: {integrity: sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==}
|
||||
engines: {node: '>= 4.0.0'}
|
||||
|
|
@ -5628,10 +5619,6 @@ packages:
|
|||
colortranslator@5.0.0:
|
||||
resolution: {integrity: sha512-Z3UPUKasUVDFCDYAjP2fmlVRf1jFHJv1izAmPjiOa0OCIw1W7iC8PZ2GsoDa8uZv+mKyWopxxStT9q05+27h7w==}
|
||||
|
||||
combined-stream@1.0.8:
|
||||
resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==}
|
||||
engines: {node: '>= 0.8'}
|
||||
|
||||
comma-separated-tokens@2.0.3:
|
||||
resolution: {integrity: sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==}
|
||||
|
||||
|
|
@ -5966,10 +5953,6 @@ packages:
|
|||
defu@6.1.4:
|
||||
resolution: {integrity: sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==}
|
||||
|
||||
delayed-stream@1.0.0:
|
||||
resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==}
|
||||
engines: {node: '>=0.4.0'}
|
||||
|
||||
denque@2.1.0:
|
||||
resolution: {integrity: sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==}
|
||||
engines: {node: '>=0.10'}
|
||||
|
|
@ -6483,9 +6466,6 @@ packages:
|
|||
resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==}
|
||||
engines: {node: '>=4.0'}
|
||||
|
||||
estree-walker@0.6.1:
|
||||
resolution: {integrity: sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==}
|
||||
|
||||
estree-walker@1.0.1:
|
||||
resolution: {integrity: sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==}
|
||||
|
||||
|
|
@ -6695,10 +6675,6 @@ packages:
|
|||
resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==}
|
||||
engines: {node: '>=14'}
|
||||
|
||||
form-data@4.0.4:
|
||||
resolution: {integrity: sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==}
|
||||
engines: {node: '>= 6'}
|
||||
|
||||
format@0.2.2:
|
||||
resolution: {integrity: sha512-wzsgA6WOq+09wrU1tsJ09udeR/YZRaeArL9e1wPbFg3GG2yDnC2ldKpxs4xunpFF9DgqCqOIra3bc1HWrJ37Ww==}
|
||||
engines: {node: '>=0.4.x'}
|
||||
|
|
@ -8985,13 +8961,6 @@ packages:
|
|||
rfdc@1.4.1:
|
||||
resolution: {integrity: sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==}
|
||||
|
||||
rollup-plugin-inject@3.0.2:
|
||||
resolution: {integrity: sha512-ptg9PQwzs3orn4jkgXJ74bfs5vYz1NCZlSQMBUA0wKcGp5i5pA1AO3fOUEte8enhGUC+iapTCzEWw2jEFFUO/w==}
|
||||
deprecated: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-inject.
|
||||
|
||||
rollup-plugin-node-polyfills@0.2.1:
|
||||
resolution: {integrity: sha512-4kCrKPTJ6sK4/gLL/U5QzVT8cxJcofO0OU74tnB19F40cmuAKSzH5/siithxlofFEjwvw1YAhPmbvGNA6jEroA==}
|
||||
|
||||
rollup-plugin-visualizer@6.0.3:
|
||||
resolution: {integrity: sha512-ZU41GwrkDcCpVoffviuM9Clwjy5fcUxlz0oMoTXTYsK+tcIFzbdacnrr2n8TXcHxbGKKXtOdjxM2HUS4HjkwIw==}
|
||||
engines: {node: '>=18'}
|
||||
|
|
@ -9005,9 +8974,6 @@ packages:
|
|||
rollup:
|
||||
optional: true
|
||||
|
||||
rollup-pluginutils@2.8.2:
|
||||
resolution: {integrity: sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==}
|
||||
|
||||
rollup@2.79.2:
|
||||
resolution: {integrity: sha512-fS6iqSPZDs3dr/y7Od6y5nha8dW1YnbgtsyotCVvoFGKbERG++CVRFv1meyGDE1SNItQA8BrnCw7ScdAhRJ3XQ==}
|
||||
engines: {node: '>=10.0.0'}
|
||||
|
|
@ -16361,8 +16327,6 @@ snapshots:
|
|||
|
||||
async@3.2.6: {}
|
||||
|
||||
asynckit@0.4.0: {}
|
||||
|
||||
at-least-node@1.0.0: {}
|
||||
|
||||
automd@0.4.2(magicast@0.3.5):
|
||||
|
|
@ -16776,10 +16740,6 @@ snapshots:
|
|||
|
||||
colortranslator@5.0.0: {}
|
||||
|
||||
combined-stream@1.0.8:
|
||||
dependencies:
|
||||
delayed-stream: 1.0.0
|
||||
|
||||
comma-separated-tokens@2.0.3: {}
|
||||
|
||||
commander@10.0.1: {}
|
||||
|
|
@ -17059,8 +17019,6 @@ snapshots:
|
|||
|
||||
defu@6.1.4: {}
|
||||
|
||||
delayed-stream@1.0.0: {}
|
||||
|
||||
denque@2.1.0: {}
|
||||
|
||||
depd@2.0.0: {}
|
||||
|
|
@ -17829,8 +17787,6 @@ snapshots:
|
|||
|
||||
estraverse@5.3.0: {}
|
||||
|
||||
estree-walker@0.6.1: {}
|
||||
|
||||
estree-walker@1.0.1: {}
|
||||
|
||||
estree-walker@2.0.2: {}
|
||||
|
|
@ -18103,14 +18059,6 @@ snapshots:
|
|||
cross-spawn: 7.0.6
|
||||
signal-exit: 4.1.0
|
||||
|
||||
form-data@4.0.4:
|
||||
dependencies:
|
||||
asynckit: 0.4.0
|
||||
combined-stream: 1.0.8
|
||||
es-set-tostringtag: 2.1.0
|
||||
hasown: 2.0.2
|
||||
mime-types: 2.1.35
|
||||
|
||||
format@0.2.2: {}
|
||||
|
||||
forwarded@0.2.0: {}
|
||||
|
|
@ -21289,16 +21237,6 @@ snapshots:
|
|||
|
||||
rfdc@1.4.1: {}
|
||||
|
||||
rollup-plugin-inject@3.0.2:
|
||||
dependencies:
|
||||
estree-walker: 0.6.1
|
||||
magic-string: 0.25.9
|
||||
rollup-pluginutils: 2.8.2
|
||||
|
||||
rollup-plugin-node-polyfills@0.2.1:
|
||||
dependencies:
|
||||
rollup-plugin-inject: 3.0.2
|
||||
|
||||
rollup-plugin-visualizer@6.0.3(rollup@4.52.5):
|
||||
dependencies:
|
||||
open: 8.4.2
|
||||
|
|
@ -21317,10 +21255,6 @@ snapshots:
|
|||
optionalDependencies:
|
||||
rollup: 4.53.3
|
||||
|
||||
rollup-pluginutils@2.8.2:
|
||||
dependencies:
|
||||
estree-walker: 0.6.1
|
||||
|
||||
rollup@2.79.2:
|
||||
optionalDependencies:
|
||||
fsevents: 2.3.3
|
||||
|
|
|
|||
Loading…
Reference in a new issue