Skip to content

Commit 7a0f5fa

Browse files
committed
Remove runtime require
1 parent 972212f commit 7a0f5fa

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

src/file-system-loader.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,6 @@ export default class FileSystemLoader {
3636
rootRelativePath = path.resolve( relativeDir, newPath ),
3737
fileRelativePath = path.resolve( path.join( this.root, relativeDir ), newPath )
3838

39-
// if the path is not relative or absolute, try to resolve it in node_modules
40-
if (newPath[0] !== '.' && newPath[0] !== '/') {
41-
try {
42-
fileRelativePath = require.resolve(newPath);
43-
}
44-
catch (e) {}
45-
}
46-
4739
const tokens = this.tokensByFile[fileRelativePath]
4840
if (tokens) { return resolve(tokens) }
4941

0 commit comments

Comments
 (0)