refactor(nuxt): fix typo in internal plugin names (#9201)

This commit is contained in:
Danil Zalizchuk 2022-11-21 12:45:54 +02:00 committed by GitHub
parent 88d7077fca
commit e85e3ab6e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -12,7 +12,7 @@ export const DevOnlyPlugin = createUnplugin((options: DevOnlyPluginOptions) => {
const DEVONLY_COMP_RE = /<dev-?only>(:?[\s\S]*)<\/dev-?only>/gmi const DEVONLY_COMP_RE = /<dev-?only>(:?[\s\S]*)<\/dev-?only>/gmi
return { return {
name: 'nuxt:server-devonly:transfrom', name: 'nuxt:server-devonly:transform',
enforce: 'pre', enforce: 'pre',
transformInclude (id) { transformInclude (id) {
const { pathname, search } = parseURL(decodeURIComponent(pathToFileURL(id).href)) const { pathname, search } = parseURL(decodeURIComponent(pathToFileURL(id).href))

View File

@ -13,7 +13,7 @@ export const TreeShakePlugin = createUnplugin((options: TreeShakePluginOptions)
const COMPOSABLE_RE = new RegExp(`($\\s+)(${options.treeShake.join('|')})(?=\\()`, 'gm') const COMPOSABLE_RE = new RegExp(`($\\s+)(${options.treeShake.join('|')})(?=\\()`, 'gm')
return { return {
name: 'nuxt:server-treeshake:transfrom', name: 'nuxt:server-treeshake:transform',
enforce: 'post', enforce: 'post',
transformInclude (id) { transformInclude (id) {
const { pathname, search } = parseURL(decodeURIComponent(pathToFileURL(id).href)) const { pathname, search } = parseURL(decodeURIComponent(pathToFileURL(id).href))

View File

@ -12,7 +12,7 @@ export const UnctxTransformPlugin = (nuxt: Nuxt) => {
nuxt.hook('app:resolve', (_app) => { app = _app }) nuxt.hook('app:resolve', (_app) => { app = _app })
return createUnplugin((options: { sourcemap?: boolean } = {}) => ({ return createUnplugin((options: { sourcemap?: boolean } = {}) => ({
name: 'unctx:transfrom', name: 'unctx:transform',
enforce: 'post', enforce: 'post',
transformInclude (id) { transformInclude (id) {
id = normalize(id).replace(/\?.*$/, '') id = normalize(id).replace(/\?.*$/, '')