Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: suport import function with webpackChunkName comment #164

Merged
merged 1 commit into from
Mar 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: suport import function that with webpackChunkName comment
  • Loading branch information
viezhong committed Mar 13, 2023
commit 0550b0b1a5497e31be4db5593c6d6caa5ab6a3dd
2 changes: 1 addition & 1 deletion src/utils/import-path-resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const importString = `(?:${anyQuote}${pathStringContent}${anyQuote})`;
// Separate patterns for each style of import statement,
// wrapped in non-capturing groups,
// so that they can be strung together in one big pattern.
const funcStyle = `(?:\\b(?:import|require)\\s*\\(\\s*${importString}\\s*\\))`;
const funcStyle = `(?:\\b(?:import|require)\\s*\\(\\s*(\\/\\*.*\\*\\/\\s*)?${importString}\\s*\\))`;
const globalStyle = `(?:\\bimport\\s+${importString})`;
const fromStyle = `(?:\\bfrom\\s+${importString})`;
const moduleStyle = `(?:\\bmodule\\s+${importString})`;
Expand Down