Skip to content

Commit

Permalink
fix: πŸ› rollback tailwind config load behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
shufo committed Jul 8, 2023
1 parent e55e792 commit 5c61c86
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/util.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import vscode from "vscode";
import fs from 'fs';
import { transform } from 'sucrase';

/**
* Returns a node module installed with VSCode, or null if it fails.
Expand Down Expand Up @@ -26,8 +28,10 @@ export function requireUncached(moduleName: string) {
try {
// @ts-ignore
delete __non_webpack_require__.cache[__non_webpack_require__.resolve(moduleName)];
// @ts-ignore
import(moduleName);

const fileContent = fs.readFileSync(moduleName, 'utf8');

return transform(fileContent, { transforms: ['imports'] });
} catch (err: any) {
throw err;
}
Expand Down

0 comments on commit 5c61c86

Please sign in to comment.