Skip to content
New issue

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

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

Already on GitHub? # to your account

dev env: Add globalModulePaths in .postcss #34

Closed
OleksiyRudenko opened this issue May 16, 2021 · 3 comments
Closed

dev env: Add globalModulePaths in .postcss #34

OleksiyRudenko opened this issue May 16, 2021 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@OleksiyRudenko
Copy link
Member

OleksiyRudenko commented May 16, 2021

  1. In .postcssrc: add globalModulePaths
{
  ...
  plugins: {
    ...
    'postcss-modules': {
      ...
      globalModulePaths: [
        'src/index.css'
      ]
    }
  }
}
  1. Add src/index.css for global styles
@OleksiyRudenko OleksiyRudenko added the bug Something isn't working label May 16, 2021
@OleksiyRudenko OleksiyRudenko changed the title Add globalModulePaths in .postcss dev env: Add globalModulePaths in .postcss May 16, 2021
@yaripey
Copy link

yaripey commented May 16, 2021

It does work, but I added the plugin into .postcssrc file, not .postcss, since I don't have one.

@OleksiyRudenko
Copy link
Member Author

Thank you for confirming and comment on config file. Fixed that

@OleksiyRudenko
Copy link
Member Author

Resolved by 74ba98c

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants