csstools / csstools/postcss-normalize

postcss-import config missing options

Open
#49 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
CSS
Stars
837
Forks
40
PR merge metrics
No merged PRs in 30d

Description

In the config object of `postcss-import`, there's a **path** option to define where it has to search for a file.

at the moment the only way is to create a resolve function:
```js
const path = require('path');
const atImport = require('postcss-import');
const postcssNormalize = require('postcss-normalize');

module.exports = {
// [...]
plugins: [
atImport(postcssNormalize(/* opts */).postcssImport({
resolve: (id) => path.resolve(__dirname, 'path/to/css', `${id}.css`),
})),
],
};
```

but we could be allowed to use **options.path**

```js
const atImport = require('postcss-import');
const postcssNormalize = require('postcss-normalize');

module.exports = {
// [...]
plugins: [
atImport(postcssNormalize(/* opts */).postcssImport({
path: 'path/to/css',
})),
],
};
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.