We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ed47c2b commit ee59f86Copy full SHA for ee59f86
index.js
@@ -15,7 +15,7 @@ function pluginLodashImport(options = {}) {
15
const extension = path.extname(args.path).replace('.', '');
16
const loader = JS_EXTENSIONS.has(extension) ? 'jsx' : extension;
17
18
- const lodashImportRegex = /import\s+?(?:(?:(?:[\w*\s{},]*)\s+from\s+?)|)(?:(?:'lodash\/?.*?'))[\s]*?(?:;|$|)/g;
+ const lodashImportRegex = /import\s+?(?:(?:(?:[\w*\s{},]*)\s+from\s+?)|)[\'\"](?:(?:lodash\/?.*?))[\'\"][\s]*?(?:;|$|)/g;
19
20
const lodashImports = contents.match(lodashImportRegex);
21
0 commit comments