Skip to content

Commit f1821fd

Browse files
committed
fix: Don't set default rootDir at time of import.
We need to lazily default rootDir to the current working directory so that the current working directory can be set by code that runs after boot up.
1 parent adb7d68 commit f1821fd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/@css-blocks/core/src/configuration/resolver.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const SIMPLE_KEYS: Array<ConfigurationSimpleKeys> = [
2828
const DEFAULTS: ResolvedConfiguration = {
2929
outputMode: OutputMode.BEM,
3030
importer: defaultImporter,
31-
rootDir: process.cwd(),
31+
rootDir: "",
3232
importerData: {},
3333
preprocessors: {},
3434
disablePreprocessChaining: false,
@@ -43,6 +43,7 @@ class Resolver implements ResolvedConfiguration {
4343

4444
constructor(options?: Options, defaults?: Options) {
4545
this._opts = { ...DEFAULTS };
46+
this.setAll({rootDir: process.cwd()});
4647
this.setAll(defaults);
4748
this.setAll(options);
4849
}

0 commit comments

Comments
 (0)