mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-29 09:02:03 +00:00
fix(webpack): respect build.transpile
(#5043)
This commit is contained in:
parent
970758e050
commit
5d4586a322
@ -14,7 +14,8 @@ export function base (ctx: WebpackConfigContext) {
|
|||||||
baseAlias,
|
baseAlias,
|
||||||
baseConfig,
|
baseConfig,
|
||||||
basePlugins,
|
basePlugins,
|
||||||
baseResolve
|
baseResolve,
|
||||||
|
baseTranspile
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -157,9 +158,7 @@ export function baseTranspile (ctx: WebpackConfigContext) {
|
|||||||
pattern = pattern(ctx)
|
pattern = pattern(ctx)
|
||||||
}
|
}
|
||||||
if (typeof pattern === 'string') {
|
if (typeof pattern === 'string') {
|
||||||
const posixModule = pattern.replace(/\\/g, '/')
|
transpile.push(new RegExp(escapeRegExp(normalize(pattern))))
|
||||||
// TODO: should only do for clientside? (hint: pathNormalize)
|
|
||||||
transpile.push(new RegExp(escapeRegExp(normalize(posixModule))))
|
|
||||||
} else if (pattern instanceof RegExp) {
|
} else if (pattern instanceof RegExp) {
|
||||||
transpile.push(pattern)
|
transpile.push(pattern)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user