Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 11:14
    ivan-nemtinov commented #926
  • 11:09
    ivan-nemtinov commented #926
  • Dec 13 18:27
    ivan-nemtinov commented #926
  • Dec 13 18:27
    ivan-nemtinov commented #926
  • Dec 09 18:21
    JediSange commented #782
  • Dec 09 16:50
    JediSange commented #782
  • Dec 09 16:50
    JediSange commented #782
  • Dec 05 21:45
    saiMedavarapu commented #1997
  • Nov 07 08:26
    testacp commented #1853
  • Nov 07 08:26
    testacp commented #1853
  • Oct 30 15:24
    emanuelcoelho1986 closed #2011
  • Oct 30 10:43
    sameerpallav commented #2025
  • Oct 15 15:20
    alanhg commented #1997
  • Sep 30 15:12
    bbrink68 commented #2049
  • Aug 23 13:34
    SouravKumar89 edited #2058
  • Aug 23 13:27
    SouravKumar89 opened #2058
  • Aug 22 00:04

    PatrickJS on master

    Update README.md (compare)

  • Aug 13 17:17
    ramsunvtech commented #1925
  • Aug 12 22:58
    terrancecorley commented #770
  • Aug 09 02:30
    jindovu commented #2049
rvalimaki
@rvalimaki
Hi everyone. Nobody knows a way to compress (gzip) also the assets? My .js bundles (src/app) are gzipped as expected, but static assets (such as .js files, .json, fonts, etc.) from src/assets are not zipped.
I did add relevant file extensions to the regexp of CompressionPlugin, and that was having the .js already anyway, but it did not help.
syberpunk
@syberpunk

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
@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
Hello there, can someone explain me where should I add vendor css?
Sam Jones
@ollwenjones
@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
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
I believe it is option 2: "feed it through the webpack bundling (process urls, etc.)"
for static
Marcos Kichel
@marcoskichel
what about dynamic?
Sam Jones
@ollwenjones
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
ok, I will google to learn how to to that, thanks :D
Sam Jones
@ollwenjones
in your JS require('primeui/primeui-ng-all.css'); should do the trick...
Marcos Kichel
@marcoskichel
Oh, thanks >D
Sam Jones
@ollwenjones
webpack requires are like commonjs requires.
my fav resource for folks new to webpack:
https://github.com/petehunt/webpack-howto
Marcos Kichel
@marcoskichel
very usefull!
Sam Jones
@ollwenjones
np
Jamie Spittal
@Spittal
Hey anybody know how to get the TsLint things in the console in the latest update?
I miss those from 3.0 :(
syberpunk
@syberpunk
@ollwenjones I agree and I've done that but now I can't get the value i'm trying to return in my base file... :(
keep in mind - this is a separate solution from the one I'm gonna be using the code in.
Any thoughts?
Sam Jones
@ollwenjones
@syberpunk Afraid I've never touched browserify, and not sure what you're saying is happening.
You're not able to require('projectA/moduleNameA') from within project B? Is that what you're saying?
Graham Churchley
@gchurchley
I just switched out my systemJs in favor of webpack. Now I don't need system.js, rx.js, the System.config block, or the System.import statement. My index.html is so much cleaner and all the transpiling is done at build time. Isn't this the way it's supposed to be? :smile:
Christophe HOARAU
@no-more
Hello, I'm new to angular 2 and I started with your great pack. But I don't really understand the platform folder. It seems very complicated to me. And I don't undestand why the browser folder. It doesn't seems to be releated to browser at all. I hope someone coule help me to better understand.
thomas-bee
@thomas-bee
Hi, I am wondering what advantages / disadvantages you guys see in this ng2 seed over mgechev's system.js based one
Tanner Stirrat
@tstirrat15
hey all, question on webpack's build. I've been using the convention of separate template files, and i've been putting them in the same folder as all of my typescript files. when I built the prod distribution, it stopped being able to find them, because the referenced folder doesn't exist anymore. is there an expectation that template files are going into a static folder?
Graham Churchley
@gchurchley
@tstirrat15 I also keep my template files in the same folder. I reference them in templateUrl by name only (no path) and I use the moduleId property to specify a relative file. e.g. moduleId: module.id, templateUrl: 'myFile.tpl.html'
See this post for more details: http://schwarty.com/2015/12/22/angular2-relative-paths-for-templateurl-and-styleurls/
Graham Churchley
@gchurchley
@tstirrat15 - sorry, I don't think my suggestion will work for you with webpack.
Tanner Stirrat
@tstirrat15
mmm... My thought is it to just put them in with the static files and reference them that way. At least then I know they'll show up...
Attila Egyed
@tsm91

hi there, is there any documentation on how angular2-hmr works?

and how to use vanilla redux with it? (no rxjs, no ngrx)

Tanner Stirrat
@tstirrat15

I'm running into a different problem now. I updated to the most recent version of webpack, and I'm getting an error that says:

Error: Cannot resolve 'file' or 'directory' ./app in /home/tstirrat/project-gutenberg/node/src
    Required in /home/tstirrat/project-gutenberg/node/src/main.browser.ts Error: Cannot resolve 'file' or 'directory' ./app in /home/tstirrat/project-gutenberg/node/src
    Required in /home/tstirrat/project-gutenberg/node/src/main.browser.ts
    at ResolutionError.Error (native)
    at new ResolutionError (/home/tstirrat/project-gutenberg/node/node_modules/awesome-typescript-loader/dist/deps.js:281:7)
    at /home/tstirrat/project-gutenberg/node/node_modules/awesome-typescript-loader/dist/deps.js:164:33
    at run (/home/tstirrat/project-gutenberg/node/node_modules/core-js/modules/es6.promise.js:89:22)
    at /home/tstirrat/project-gutenberg/node/node_modules/core-js/modules/es6.promise.js:102:28
    at flush (/home/tstirrat/project-gutenberg/node/node_modules/core-js/modules/_microtask.js:14:5)
    at nextTickCallbackWith0Args (node.js:452:9)
    at process._tickCallback (node.js:381:13)

But I've got app in that directory. ls output:

app  assets  custom-typings.d.ts  index.html  main.browser.ts  npm-debug.log  platform  polyfills.ts  vendor.ts

Any idea what's going on?

Tanner Stirrat
@tstirrat15
I figured it out. It turned out that the new version relied on an index.ts, which I had deleted, thinking I didn't need it. that meant that main.ts (or whatever its current equivalent is) was trying to import from a module that wasn't well-defined (or something to that effect)
Didier Hartong
@DHFW

Hello, any one knows how to async load a component that has child routes.
This works:

{ path: '/about', name: 'About', loader: () => require('es6-promise!./about')('About') },

But this throws an error:

{ path: '/...',  name: 'Exam',  loader: () => require('es6-promise!./exam')('Exam') },

The error is: "Tried to get instruction before the type was loaded".

An Xie
@ShaneXie
Could anyone tell me what's the purpose of those index.ts files?
Christophe HOARAU
@no-more
@ShaneXie it's just the default file when you don't specify any one when you import a folder.
Marcin Wojtczak
@zoamel
Hey everyone! Is there any smart way to update angular2-webpack-starter locally after having it used in an application? I removed the original git folder and replaced with mine git repo
Yaroslav Yakovlev
@yaroslavya
@zoamel what I did was going through the commits and updating manually. Doesnt look like a way to go but it worked for me :-)
Marcin Wojtczak
@zoamel
@yaroslavya yeah thats the way I'm doing it now but it's a little bit tedious :D
Murhaf Sousli
@MurhafSousli
anyone here?
Anas R. Firdousi
@afirdousi
using the starter, I generate a dist folder for my application... When i try to run the application, everything within dist is dispatched to browser except for my vendor folder. I am using express to serve the app on top of this starter.
Screen Shot 2016-04-09 at 1.27.02 PM.png
Screen Shot 2016-04-09 at 1.23.56 PM.png
Screen Shot 2016-04-09 at 1.26.02 PM.png
and I have few references to .js files from vendor/ in my index.html which obviously fail because the vendor folder is never dispatched to the browser.