Skip to content

Commit b7d2918

Browse files
committed
global cache of tokens, not only for the single require call
1 parent ecabdc8 commit b7d2918

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import LocalByDefault from 'postcss-modules-local-by-default';
99
import Scope from 'postcss-modules-scope';
1010
import Parser from './parser';
1111

12+
const tokensByFile = {};
1213
let plugins = [LocalByDefault, ExtractImports, Scope];
1314
let rootDir;
1415

@@ -29,7 +30,6 @@ function load(sourceString, sourcePath, trace, pathFetcher) {
2930

3031
hook(filename => {
3132
const root = rootDir || dirname(filename);
32-
const tokensByFile = {};
3333
let importNr = 0;
3434

3535
const fetch = (_newPath, _relativeTo, _trace) => {

0 commit comments

Comments
 (0)