Skip to content

Commit

Permalink
fix: 🐛 tailwindcss config does not respect correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
shufo committed Sep 18, 2022
1 parent e12cf3e commit 55bd09c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,12 @@ class BladeFormatter {
}

async format(content: any, opts = {}) {
const options = this.options || opts;
await this.readIgnoreFile(process.cwd());
await this.readRuntimeConfig(process.cwd());
return new Formatter(options).formatContent(content).catch((err) => {
this.options = this.options || opts;
const target = nodepath.resolve(process.cwd(), 'target');
await this.readIgnoreFile(target);
await this.findTailwindConfig(target);
await this.readRuntimeConfig(target);
return new Formatter(this.options).formatContent(content).catch((err) => {
throw new FormatError(err);
});
}
Expand Down

0 comments on commit 55bd09c

Please sign in to comment.