mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +00:00
refactor(nuxt): remove #head
alias (#20111)
This commit is contained in:
parent
9e503be0f2
commit
6ddea42f96
@ -38,10 +38,6 @@
|
||||
"types": "./dist/app/index.d.ts",
|
||||
"import": "./dist/app/index.js"
|
||||
},
|
||||
"#head": {
|
||||
"types": "./dist/head/runtime/index.d.ts",
|
||||
"import": "./dist/head/runtime/index.js"
|
||||
},
|
||||
"#pages": {
|
||||
"types": "./dist/pages/runtime/index.d.ts",
|
||||
"import": "./dist/pages/runtime/index.js"
|
||||
|
@ -14,14 +14,6 @@ export default defineNuxtModule({
|
||||
// Transpile @unhead/vue
|
||||
nuxt.options.build.transpile.push('@unhead/vue')
|
||||
|
||||
// TODO: remove alias in v3.4
|
||||
nuxt.options.alias['#head'] = nuxt.options.alias['#app']
|
||||
nuxt.hook('prepare:types', ({ tsConfig }) => {
|
||||
tsConfig.compilerOptions = tsConfig.compilerOptions || {}
|
||||
delete tsConfig.compilerOptions.paths['#head']
|
||||
delete tsConfig.compilerOptions.paths['#head/*']
|
||||
})
|
||||
|
||||
// Register components
|
||||
const componentsPath = resolve(runtimeDir, 'components')
|
||||
for (const componentName of components) {
|
||||
|
3
test/fixtures/basic/plugins/my-plugin.ts
vendored
3
test/fixtures/basic/plugins/my-plugin.ts
vendored
@ -1,6 +1,3 @@
|
||||
// @ts-expect-error
|
||||
import { useHead } from '#head'
|
||||
|
||||
export default defineNuxtPlugin(() => {
|
||||
useHead({
|
||||
titleTemplate: '%s - Fixture'
|
||||
|
Loading…
Reference in New Issue
Block a user