Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

postcss-import config missing options #49

Open
Yimiprod opened this issue Jun 19, 2020 · 0 comments
Open

postcss-import config missing options #49

Yimiprod opened this issue Jun 19, 2020 · 0 comments

Comments

@Yimiprod
Copy link

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:

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

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

module.exports = {
// [...]
  plugins: [
    atImport(postcssNormalize(/* opts */).postcssImport({
      path: 'path/to/css',
    })),
  ],
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant