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

Including css require postcss-import because of .postcssrc.js #17

Closed
doits opened this issue Sep 6, 2018 · 2 comments
Closed

Including css require postcss-import because of .postcssrc.js #17

doits opened this issue Sep 6, 2018 · 2 comments

Comments

@doits
Copy link

doits commented Sep 6, 2018

When I try to include the basic styles (vue-flash-message/dist/vue-flash-message.min.css) it complains that it cannot find postcss-import and I should install it. I traced it down to the .postcssrc.js under node_modules/vue-flash-message/.postcssrc.js – it seems by importing the styles postcss traverses up until it finds a config and tries to use this.

It should of course only use my own postcss config. I think you should exclude the postcss config from bundling, since it should not be needed when using this as a plugin.

@doits
Copy link
Author

doits commented Sep 6, 2018

The error is:

error  in ./node_modules/vue-flash-message/dist/vue-flash-message.min.css

Module build failed (from ./node_modules/postcss-loader/lib/index.js):
Error: Loading PostCSS Plugin failed: Cannot find module 'postcss-import'

(@/Users/markus/svn/ats/frontend/node_modules/vue-flash-message/.postcssrc.js)
    at load (/Users/markus/svn/ats/frontend/node_modules/postcss-load-config/src/plugins.js:21:13)
    at Object.keys.filter.map (/Users/markus/svn/ats/frontend/node_modules/postcss-load-config/src/plugins.js:53:16)
    at Array.map (<anonymous>)
    at plugins (/Users/markus/svn/ats/frontend/node_modules/postcss-load-config/src/plugins.js:52:8)
    at config.load.then (/Users/markus/svn/ats/frontend/node_modules/postcss-load-config/src/index.js:72:18)

I don't think the plugin should mess with the postcss config. I think it is because of the config cascade.

@keen-on-design
Copy link
Owner

keen-on-design commented Oct 24, 2018

@doits fixed that in 0.7.0. Thank you!

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

2 participants