Skip to content

Commit

Permalink
fix: Allow Absolute Paths (#679)
Browse files Browse the repository at this point in the history
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
```
  • Loading branch information
Subash authored Jun 1, 2021
1 parent 9188282 commit 15335a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/purgecss/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export async function setOptions(
): Promise<Options> {
let options: Options;
try {
const t = path.join(process.cwd(), configFile);
const t = path.resolve(process.cwd(), configFile);
options = await import(t);
} catch (err) {
throw new Error(`${ERROR_CONFIG_FILE_LOADING} ${err.message}`);
Expand Down

0 comments on commit 15335a2

Please sign in to comment.