These are chat archives for AngularClass/angular2-webpack-starter

30th
Mar 2016
syberpunk
@syberpunk
Mar 30 2016 08:57

Howdy Yall!!!

Does anybody here use Webpack &/| Browserify and can help a brother out?

I have a browserify bundled code that I would like to wrap with webpack or alternatively bundle in webpack and return an object.
(It's a whole project on it's own)

I tried to bundle it as a library but couldn't get that one final return value.

Any thoughts?

Sam Jones
@ollwenjones
Mar 30 2016 16:31
@syberpunk I feel like the "right way TM" to use webpack is to let it bundle all the raw code, and not feed it pre-processed/bundled code. (It usually yells on the console if you do.) These like de-duping of shared dependencies can't be done if you pre-bundle the other project. (Sorry that's just advice and not technical help; that's about all I know.)
Marcos Kichel
@marcoskichel
Mar 30 2016 16:57
Hello there, can someone explain me where should I add vendor css?
Sam Jones
@ollwenjones
Mar 30 2016 17:08
@marcoskichel do you want to copy it over as a static asset of feed it through the webpack bundling (process urls, etc.)?
Marcos Kichel
@marcoskichel
Mar 30 2016 17:10
I am actually importing primeNG so I imported it using npm
now I have to use that:
<link rel="stylesheet" type="text/css" href="node_modules/primeui/primeui-ng-all.css" />
how can I properly inject add these css files dependecies, I am new to front-end development, so sorry if its kinda newbie question
Marcos Kichel
@marcoskichel
Mar 30 2016 17:15
I believe it is option 2: "feed it through the webpack bundling (process urls, etc.)"
for static
Marcos Kichel
@marcoskichel
Mar 30 2016 17:17
what about dynamic?
Sam Jones
@ollwenjones
Mar 30 2016 17:17
to process it either import it using PostCSS / SASS / LESS loader, or require it somewhere in the component / module that depends on it
Marcos Kichel
@marcoskichel
Mar 30 2016 17:17
ok, I will google to learn how to to that, thanks :D
Sam Jones
@ollwenjones
Mar 30 2016 17:18
in your JS require('primeui/primeui-ng-all.css'); should do the trick...
Marcos Kichel
@marcoskichel
Mar 30 2016 17:19
Oh, thanks >D
Sam Jones
@ollwenjones
Mar 30 2016 17:19
webpack requires are like commonjs requires.
my fav resource for folks new to webpack:
https://github.com/petehunt/webpack-howto
Marcos Kichel
@marcoskichel
Mar 30 2016 17:19
very usefull!
Sam Jones
@ollwenjones
Mar 30 2016 17:21
np
Jamie Spittal
@Spittal
Mar 30 2016 22:05
Hey anybody know how to get the TsLint things in the console in the latest update?
I miss those from 3.0 :(