Skip to content

Commit 15335a2

Browse files
authored
fix: Allow Absolute Paths (#679)
Currently PurgeCSS only allows relative config path. For example, ```shell purgecss --config abc/purgecss.config.js ``` This will allow absolute paths such as ```shell purgecss --config /Users/subash/Desktop/Test/purgecss.config.js ```
1 parent 9188282 commit 15335a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/purgecss/src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export async function setOptions(
6363
): Promise<Options> {
6464
let options: Options;
6565
try {
66-
const t = path.join(process.cwd(), configFile);
66+
const t = path.resolve(process.cwd(), configFile);
6767
options = await import(t);
6868
} catch (err) {
6969
throw new Error(`${ERROR_CONFIG_FILE_LOADING} ${err.message}`);

0 commit comments

Comments
 (0)