mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 13:45:18 +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,
|
||||
baseConfig,
|
||||
basePlugins,
|
||||
baseResolve
|
||||
baseResolve,
|
||||
baseTranspile
|
||||
])
|
||||
}
|
||||
|
||||
@ -157,9 +158,7 @@ export function baseTranspile (ctx: WebpackConfigContext) {
|
||||
pattern = pattern(ctx)
|
||||
}
|
||||
if (typeof pattern === 'string') {
|
||||
const posixModule = pattern.replace(/\\/g, '/')
|
||||
// TODO: should only do for clientside? (hint: pathNormalize)
|
||||
transpile.push(new RegExp(escapeRegExp(normalize(posixModule))))
|
||||
transpile.push(new RegExp(escapeRegExp(normalize(pattern))))
|
||||
} else if (pattern instanceof RegExp) {
|
||||
transpile.push(pattern)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user