csstools / csstools/postcss-normalize

postcss-import config missing options

Offen
#49 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
CSS
Sterne
837
Forks
40
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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',
})),
],
};
```

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.