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

Issue w/ SSR #25

Open
jrodl3r opened this issue Jul 1, 2016 · 4 comments
Open

Issue w/ SSR #25

jrodl3r opened this issue Jul 1, 2016 · 4 comments

Comments

@jrodl3r
Copy link

jrodl3r commented Jul 1, 2016

Having a tough time adding this to a project - react-webpack-node

Able to log "opts", "css", and "styles" output, so it's getting good data.

Wondering if the Server Side Rendering (injects all HTML onLoad) is what might be blocking this package from showing any visible browser activity?

postCSS setup:

[
  require('postcss-import')({
    path: path.join(__dirname, '..', 'app', 'css'),
    addDependencyTo: webpack
  }),
  require('postcss-cssnext')({
    browsers: ['> 1%', 'last 2 versions']
  }),
  require('postcss-browser-reporter'),
  require('postcss-reporter')({ clearMessages: true })
]

Thx

@MoOx
Copy link
Contributor

MoOx commented Jul 2, 2016

Should work. There is no html injection. Content is added via html::before { content:"....
Do you have any message reported by postcss-reporter? Because this won't add a thing if not.

@MoOx
Copy link
Contributor

MoOx commented Jul 2, 2016

Oh your forgot the parenthesis, that might be the reason

  require('postcss-browser-reporter'),

Try instead

  require('postcss-browser-reporter')(),

@jrodl3r
Copy link
Author

jrodl3r commented Jul 2, 2016

@MoOx (had it loaded..) would that pseudo style declaration (html::before { content:"...) be visible in Chrome DevTools?

also tried invoking parens ..er')(); and also tried passing in a config-obj { selector: 'body::before' } (and 'body:before').

no luck =\ ..but I'll keep digging, Thx for helping 👍

@MoOx
Copy link
Contributor

MoOx commented Jul 3, 2016

It's written in the doc https://github.com/postcss/postcss-browser-reporter#selector-string-default-htmlbefore. Inspect that another stronger selector is not using this already.

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