jonespen / kss-webpack-plugin

Generate KSS styleguide from Webpack
MIT License
10 stars 10 forks source link

Link generated CSS in styleguide #3

Closed phun-ky closed 6 years ago

phun-ky commented 8 years ago

I would like a feature to actually have the generated CSS from webpack in the generated styleguide.This is to actually see the styleguide result, instead of reading/using the styleguide with no real measurement/view of the desired design.

The styleguide is generally run in a dev environment using webpack-dev-server, and the dev-server do not write files to disk, so a static file (the generated css) would not be possible to include in the styleguide.

A way to circumvent this is to generate the CSS from the production config, but this is a bit of a hazzle to set up, and unless the static file in production is generated on every save (which is bad imho), the styleguide will always reflect a past version of the generated styles.

Could it be possible for this plugin to generate a static file and to be bundled with the generated styleguide?

jonespen commented 8 years ago

Hey! If I understand you correctly, there is an issue on kss-node regarding this: https://github.com/kss-node/kss-node/issues/311.

Right now this plugin is just a dumb wrapper for kss-node, and I'm using a combination of html-webpack-plugin and write-file-webpack-plugin. Not exactly optimal, but does the job.

I have been thinking maybe this should have been a loader instead of a plugin, something like sassdoc-loader.

milliephanillie commented 7 years ago

I am also having this issue. Would like to be able to see my the actual styleguide rendered when doing a webpack --watch

davecranwell-adestra commented 6 years ago

Now supported in 6ce4fae3e59aa4df2ba023f2ccc3ecd197f1a400

See README for new chunks option.

phun-ky commented 6 years ago

Keep up the good work! 👍