You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
实验项目均为重新按照官方文档流程新建立的,而不是老项目。
SyntaxError: Invalid regular expression: /(node_modules|D:\workspace\antTest\dist)/: Unterminated group
at new RegExp ()
at Bundler.setupDevServerOpts (D:\workspace\antTest\node_modules_@umijs_bundler-webpack@3.2.21@@umijs\bundler-webpack\lib\index.js:150:69)
经定位是上述index.js中正则拼接的错误,代码片段:
watchOptions: {
// not watch outputPath dir and node_modules
ignored: process.env.WATCH_IGNORED === 'none' ? undefined : new RegExp(process.env.WATCH_IGNORED || (node_modules|${absOutputPath}${_path().sep}))
}
由于${absOutputPath}${_path().sep}=D:\workspace\antTest\dist\中存在\特殊字符,导致生成正则错误,如果只针对开发,可以将后续拼接删除或者变成${absOutputPath}${_path().sep}.*,但觉得不妥,想问问有遇到这个问题的吗,如何解决。
The text was updated successfully, but these errors were encountered:
实验项目均为重新按照官方文档流程新建立的,而不是老项目。
SyntaxError: Invalid regular expression: /(node_modules|D:\workspace\antTest\dist)/: Unterminated group
at new RegExp ()
at Bundler.setupDevServerOpts (D:\workspace\antTest\node_modules_@umijs_bundler-webpack@3.2.21@@umijs\bundler-webpack\lib\index.js:150:69)
经定位是上述index.js中正则拼接的错误,代码片段:
watchOptions: {
// not watch outputPath dir and node_modules
ignored: process.env.WATCH_IGNORED === 'none' ? undefined : new RegExp(process.env.WATCH_IGNORED ||
(node_modules|${absOutputPath}${_path().sep})
)}
由于${absOutputPath}${_path().sep}=D:\workspace\antTest\dist\中存在\特殊字符,导致生成正则错误,如果只针对开发,可以将后续拼接删除或者变成${absOutputPath}${_path().sep}.*,但觉得不妥,想问问有遇到这个问题的吗,如何解决。
The text was updated successfully, but these errors were encountered: