Skip to content

Commit ba8ad7e

Browse files
committed
style updates
1 parent aa5a7da commit ba8ad7e

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/index.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ import postcss from 'postcss';
66
import { basename, dirname, join, relative, resolve } from 'path';
77
import { readFileSync } from 'fs';
88

9-
import extractImports from 'postcss-modules-extract-imports';
10-
import localByDefault from 'postcss-modules-local-by-default';
11-
import scope from 'postcss-modules-scope';
12-
import parser from './parser';
9+
import ExtractImports from 'postcss-modules-extract-imports';
10+
import LocalByDefault from 'postcss-modules-local-by-default';
11+
import Scope from 'postcss-modules-scope';
12+
import Parser from './parser';
1313

14-
let plugins = [localByDefault, extractImports, scope];
14+
let plugins = [LocalByDefault, ExtractImports, Scope];
1515
let rootDir;
1616

1717
/**
@@ -22,8 +22,8 @@ let rootDir;
2222
* @return {object}
2323
*/
2424
function load(sourceString, sourcePath, trace, pathFetcher) {
25-
let result = postcss(plugins.concat(new parser({ pathFetcher, trace })))
26-
.process(sourceString, {from: '/' + sourcePath})
25+
let result = postcss(plugins.concat(new Parser({ pathFetcher, trace })))
26+
.process(sourceString, {from: sourcePath})
2727
.root;
2828

2929
return { injectableSource: result.css, exportTokens: result.tokens };
@@ -71,7 +71,7 @@ export default function configure(opts) {
7171
let customPlugins = opts.u || opts.use;
7272
plugins = Array.isArray(customPlugins)
7373
? customPlugins
74-
: [localByDefault, extractImports, scope];
74+
: [LocalByDefault, ExtractImports, Scope];
7575

7676
if (opts.root && typeof opts.root === 'string') {
7777
rootDir = opts.root;

0 commit comments

Comments
 (0)