Webpack: Using Component specific css render different in html? -


by following tutorial,

https://github.com/christianalfoni/react-webpack-cookbook/wiki/loading-css#component-specific

i tried implementing logic, how implemented.

setup

webpack-config

this how rendered on web, html render

as can see problem, css not applied navbar class, because classname rendered ".app-components-navbar-navbar-navbar-wrapper". classname should "navbar-wrapper"

  1. how resolve this?
  2. is how supposed work?
  3. how can achieve component specific css?

inside loader css, try changing value localidentname [path][name]-[local] [local]. ident name means create css class name in following format. ".app-components-navbar-navbar-navbar-wrapper" means app/component/navbar place defined , navbar name of file. local signifies name of class in css.

hope helps


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -