JavaScriptServices icon indicating copy to clipboard operation
JavaScriptServices copied to clipboard

Cannot regenerate dist/vendor.css file

Open victorantos opened this issue 9 years ago • 4 comments

I have deleted the content of dist/vendor.css and now I cannot regenerate the css.

When I build/debug there is no css being served from server, the file empty.

How to run force webpack to generate the css? It used to be the bootstrap css inside that file.

victorantos avatar Feb 25 '17 17:02 victorantos

Run webpack --config webpack.config.vendor.js

MarkPieszak avatar Feb 25 '17 17:02 MarkPieszak

Long story short - it worked, thanks!

But this is not straight forward as it looks like, I had to deal with "webpack" not being recognised, and then npm install webpack not fixing the issue either, until I reinstalled angular cli latest and then webpack again...

victorantos avatar Feb 25 '17 19:02 victorantos

Running webpack --config webpack.config.vendor.js didn't work. Still no vendor.css in the dist folder.

exportio avatar Apr 30 '18 15:04 exportio

You don't need the vendor.css in your dist folder. The styles are automatically added by webpack in main.js. Use a text editor and inspect that file. It should be a big chunk of incomprehensible JavaScript, but if you search for a css property that you added in your site.css, you'll see that it's bundled in there.

Just take out the refecene to your vendor.css from the _Layout.cshtml

ovidiaconescu avatar Jul 25 '18 13:07 ovidiaconescu