Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Feb 23 2020 00:49
    qdouble removed as member
  • Feb 23 2020 00:49
    govi2010 removed as member
  • Feb 23 2020 00:49
    lanovoy removed as member
  • Feb 23 2020 00:49
    d3viant0ne removed as member
  • Feb 23 2020 00:49
    shlomiassaf removed as member
  • Feb 23 2020 00:49
    mastertinner removed as member
  • Feb 23 2020 00:49
    colinskow removed as member
  • Feb 23 2020 00:49
    matthewdenobrega removed as member
  • Feb 23 2020 00:49
    dotcs removed as member
  • Feb 23 2020 00:49
    DanWahlin removed as member
  • Feb 23 2020 00:49
    Foxandxss removed as member
  • Feb 23 2020 00:49
    niieani removed as member
  • Feb 23 2020 00:49
    katallaxie removed as member
  • Feb 23 2020 00:49
    kentcdodds removed as member
  • Feb 23 2020 00:49
    jeffbcross removed as member
  • Feb 23 2020 00:49
    jimthedev removed as member
  • Feb 23 2020 00:49
    carlosliu removed as member
  • Feb 23 2020 00:41
    PatrickJS commented #1686
  • Feb 22 2020 22:23
    kamil-kielczewski commented #1686
  • Feb 22 2020 22:23
    kamil-kielczewski commented #1686
Jamie Spittal
@Spittal
Yeah, it’s a little more writing forsure. But once you start really taking advantage of interfaces, abstract classes, super classes you will really see the benefit.
For example I have an abstract class for a component that animates a background. I use that as a super class for several other components in my app. Using normal JS that would be such a hassle.
but now it’s dream
rvalimaki
@rvalimaki
Hi, am I the only one to get "RangeError: Maximum call stack size exceeded" when trying to serve compiled bundles? webpack-dev-server works fine, more or less.
``` EXCEPTION: RangeError: Maximum call stack size exceededt.logError @ browser_adapter.ts:73t.logGroup @ browser_adapter.ts:84e.call @ exception_handler.ts:49(anonymous function) @ application_ref.ts:257e._notifyOnError @ ng_zone.ts:454t.onError @ ng_zone.ts:355e.run @ polyfills.8546ea7f0b535a24e15a.bundle.js:8093(anonymous function) @ ng_zone.ts:371(anonymous function) @ polyfills.8546ea7f0b535a24e15a.bundle.js:8066A @ polyfills.8546ea7f0b535a24e15a.bundle.js:7314N @ polyfills.8546ea7f0b535a24e15a.bundle.js:7326I @ polyfills.8546ea7f0b535a24e15a.bundle.js:7297(anonymous function) @ polyfills.8546ea7f0b535a24e15a.bundle.js:6969n @ ng_zone.ts:410e.run @ polyfills.8546ea7f0b535a24e15a.bundle.js:8089(anonymous function) @ ng_zone.ts:371(anonymous function) @ polyfills.8546ea7f0b535a24e15a.bundle.js:8066b @ polyfills.8546ea7f0b535a24e15a.bundle.js:7108
browser_adapter.ts:73 STACKTRACE:t.logError @ browser_adapter.ts:73e.call @ exception_handler.ts:52(anonymous function) @ application_ref.ts:257e._notifyOnError @ ng_zone.ts:454t.onError @ ng_zone.ts:355e.run @ polyfills.8546ea7f0b535a24e15a.bundle.js:8093(anonymous function) @ ng_zone.ts:371(anonymous function) @ polyfills.8546ea7f0b535a24e15a.bundle.js:8066A @ polyfills.8546ea7f0b535a24e15a.bundle.js:7314N @ polyfills.8546ea7f0b535a24e15a.bundle.js:7326I @ polyfills.8546ea7f0b535a24e15a.bundle.js:7297(anonymous function) @ polyfills.8546ea7f0b535a24e15a.bundle.js:6969n @ ng_zone.ts:410e.run @ polyfills.8546ea7f0b535a24e15a.bundle.js:8089(anonymous function) @ ng_zone.ts:371(anonymous function) @ polyfills.8546ea7f0b535a24e15a.bundle.js:8066b @ polyfills.8546ea7f0b535a24e15a.bundle.js:7108
sorry, that's pretty unreadable
angular/angular#5964 <- might be related
rvalimaki
@rvalimaki
Seems that development build (npm run build:dev) is working for me on this regard. It's only build:prod, that's giving me that maximum call stack size exceeded.
Joanne Yae
@nyjy85
How can i make a third party library into a global variable so that I don't have to import or require it in individual modules? For example, I want lodash to be globally available. How do i configure webpack to do this?
I tried to alias it like this : alias: {
lodash: path.resolve( __dirname, './node_modules/lodash')
}
then added a new plugin:
new webpack.ProvidePlugin({
myLodash: "lodash",
})
but it doesn't work
Ben
@sysupbda
I was about to say that I use DI for such cases
Joanne Yae
@nyjy85
What is DI?
Ben
@sysupbda
But in fact I don't really have such cases anymore :)
Dependency Injection
I used lodash a lot in ES5, but there are only very few things I would be missing in ES6 that would justify me still using lodash with typescript or ES6
Not sure how you could DI an entire module though to be honest
Joanne Yae
@nyjy85
well, you can do it with jquery
but it only works for jquery -_-;; and i dont know why
Ben
@sysupbda
With the alias logic you mentioned?
Joanne Yae
@nyjy85
for some reason you don't need an alias for jquery
new webpack.ProvidePlugin({
jQuery: 'jquery',
$: 'jquery',
jquery: 'jquery'
})
thats all you need
Ben
@sysupbda
you've made me curious. Would like to see what others say how they would do this. But I really find it extremely rare to need a module across many components modules since typescript and ng2
Joanne Yae
@nyjy85
you're right, its rare but i use lodash and moment everywhere
would like to have it available globally without requireing it in all my components
Ben
@sysupbda
yep.. i understand. i'll keep watching for answers here :) you might have more success in a webpack specific chat though no?
Joanne Yae
@nyjy85
Actually, I found an alternative. if you import your 3rd party libraries in your entry file, you can use them throughout your whole app without needing to require them in individual components. this essentially globalizes it
I still want to know how you can do it with resolve.alias and with plugins
Anas R. Firdousi
@afirdousi
@nyjy85 yes thats exactly the way it should be done. Import it in your main.ts or wherever you are bootstrapping your Angular app.
https://twitter.com/AnasFirdousi/status/707762724457938945
Folks, please free to comment, question or any feedbacks are hihgly appreciated.
Maciej Kowalski
@fkowal
hello

can anyone explain to my what

preLoaders: [
// TODO(gdi2290): exclude: [ helpers.root('node_modules/rxjs') ] fixed with rxjs 5 beta.3 release
{ test: /.js$/, loader: "source-map-loader", exclude: [
helpers.root('node_modules/rxjs')
] }
],

is the story behing excluding node_modules/txjs

and the comment TODO(gdi2290) ?

i have the same problem with ng2-bootstrap and if i knew what the problem is i would try to fix it in ng2-bootstrap

Leigh Caplan
@texel
Hey all, I had a quick question- is there a reason that the ng2 webpack starter isn't pulling in the polyfill bundle provided with angular2, vs using es7-reflect-metadata, zone.js/microtask, etc?
I couldn't find any explanation and I don't like cargo culting :)
Joanne Yae
@nyjy85
This message was deleted
This message was deleted
This message was deleted
Duncan Davis
@tanahara
I am having an issue with the timeout on typings install
node is complaining about "es6-promise": "github:typed-typings/npm-es6-promise#fb04188767acfec1defd054fc8024fafa5cd4de7"
It times out
Artur Rozwalak
@arozwalak
hi guys, I was wondering if it's possible to configure prod version to compile components into separate files, and than lazy load components as they are needed instead loading whole application at once?
94b
@94b
hi, do somebody has an example how to use this package with https://github.com/justindujardin/ng2-material ?
Maciej Kowalski
@fkowal
@94b i am using it with https://github.com/valor-software/ng2-bootstrap, it probably similar
94b
@94b
thanks @fkowal
Matthew de Nobrega
@matthewdenobrega
Hi all, I have a fairly large application based on this starter, and for Angular beta > 6 the dev server keeps running out of memory. Has anyone else had a similar issue, and any ideas on how to optimize the webpack config? Commenting out app entrypoints doesn't help so it looks like angular is the main culprit here. Downgrading to 6 fixes the issue.
Sam Jones
@ollwenjones
@arozwalak you have to use webpack require.ensure blocks to make it spit things into different chunks, then you have to figure out a way to load them in angular at the right time.
You can use asyncRoute to do this on a basic level fairly easily, though I imagine the more granular you want to be, the more complicated the setup will get... very quickly.
Matthieu Drula
@matthieu-D
Hi guys