We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0762081 commit ad47629Copy full SHA for ad47629
src/index.js
@@ -71,7 +71,8 @@ export default ({
71
72
const filename = stats.file.opts.filename;
73
const targetFileDirectoryPath = dirname(stats.file.opts.filename);
74
- const targetResourcePath = resolve(targetFileDirectoryPath, path.node.source.value);
+
75
+ const targetResourcePath = path.node.source.value.startsWith('.') ? resolve(targetFileDirectoryPath, path.node.source.value) : require.resolve(path.node.source.value);
76
77
let styleImportName: string;
78
0 commit comments