Git Product home page Git Product logo

Comments (5)

DzmitryShylovich avatar DzmitryShylovich commented on July 20, 2024

why you don't have the "module": "es2015" option on your tsconfig.aot.json?

this's required for Rollup as explained here. We use webpack treeshaking capabilities in this repo.

why do you have an explicit typeRoots instead of the "types" array?

both types and typeRoots are redundant with the latest tsc.

from angular-webpack-starter.

qdouble avatar qdouble commented on July 20, 2024

@tomgeorge @DzmitryShylovich I'm only using typeRoots as it improves the compatibility on Windows (seems like TS or ts-node bug), It's not necessary outside of that.

The AngularClass repo is using default exports and possibly other bad practices for working with AOT, it would be better for you to just switch to using my repo, it would take me a lot of time to refactor their repo, which I have no desire to do.

from angular-webpack-starter.

tomgeorge avatar tomgeorge commented on July 20, 2024

@qdouble @DzmitryShylovich Thanks for the response.

Sorry if I was unclear, I'm not asking you to refactor their repo, I was just wondering if anything jumped out at you immediately (e.g. removing default exports). I'll do that, and try to model after your repo. I could just fork yours and get going, but I'd like to get a little more understanding/get my hands dirty.

Could you recommend any resources that helped you get your repo going? I'm relatively new to js/ts, so stuff like what libs to use in tsconfig.json, core-js vs es6-shim (seems like these can cause duplicate id errors), what the point of default exports is, etc.

Obviously, I have been/am googling stuff on my own, just if you know of anything off the top.

from angular-webpack-starter.

qdouble avatar qdouble commented on July 20, 2024

@tomgeorge follow the AOT don'ts: https://github.com/qdouble/angular2webpack2-starter#aot--donts. There could be other configuration concerns as far as the webpack build itself, but that's a bit of a troubleshooting task.

My experience basically came from tinkering with different starter repos and just learning what does what over time. Probably best to just choose a starter at first then try to modify it for your purposes. Once you start to know enough, then you should be able to make your own build from scratch...but it took me months before I started to fully grasp webpack, so don't be worried about understanding it all over night.

from angular-webpack-starter.

tomgeorge avatar tomgeorge commented on July 20, 2024

I'm pretty happy with my webpack setup right now (using platform-browser-dynamic). But like you said, it took me months and months to get to where I am now. Then I read about AoT and I was like "hey, I want to do that". Hopefully I can piggyback on my webpack/ng2 experience :)

I'll keep tinkering with the angular2-webpack-starter. Thanks again for your help.

from angular-webpack-starter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.