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

c++ - llvm function pass ReplaceInstWithInst malloc -

Cross-Compiling Linux Kernel for Raspberry Pi - ${CCPREFIX}gcc -v does not work -

java.lang.NoClassDefFoundError When Creating New Android Project -