csstools / csstools/postcss-normalize

postcss-import config missing options

Aperta
#49 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
CSS
Stelle
837
Fork
40
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.