preboot / angular-webpack

A complete, yet simple, starter for Angular v2+ using webpack
MIT License
1.29k stars 556 forks source link

Where to place third-party files ? #339

Open Justinemmerich opened 7 years ago

Justinemmerich commented 7 years ago

Hey guys,

I'am new to ngx and want to know where I have to place and bind third party CSS & JS Files like this one here http://sdk.zurich.com/frontend-atomic/demo/zurich/01_styleguide/2_setup.html

thx

Foxandxss commented 7 years ago

Without npm package... Create a lib folder or something and put it there. It is not a common thing at all, but I guess no all libraries cares about npm.

Justinemmerich commented 7 years ago

If I create a lib folder, where I have to register the parts and will the lib folder be compiled to my dist output ?

strictd commented 7 years ago

put your lib folder or third party library in src/public .. everything in src/public/ will get compiled with your dev and dist versions. src/public/lib/ becomes lib/ in your script src.

starting on line 247 in /webpack.config.js .. CopyWebpackPlugin can copy over any other outside directories you need.

Justinemmerich commented 7 years ago

thanks guys for this blazing fast answers, i will try this today.