Comments (5)
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.
@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.
@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.
@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.
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)
- file is not exists
- Error in universal:AOT build: Cannot find module './ngfactory/app/server.app.module.ngfactory'. HOT 3
- How to add fonts HOT 3
- Can you rename the repository? HOT 2
- warnings when running `yarn` HOT 1
- AOT and platform-browser-dynamic HOT 1
- Is there a simple example that mimics communication between sibling components? HOT 1
- Is this project still active ? HOT 1
- Http(Client)Module has changed
- Typescript source maps HOT 2
- Webpack 4 / Angular 6 HOT 7
- yarn test failing HOT 2
- Ability to skip bundle analysis for CI prod builds HOT 1
- Getting "Cannot find module 'zone.js/dist/zone-node'" when deploying on production server HOT 6
- Can't run tests, at-loader can't find .ts files! HOT 1
- Getting error running Universal out of the box HOT 3
- Can you please add comments to your code. HOT 1
- How to see karma output in debug window? HOT 6
- Issue with npm/Yarn Install HOT 2
- Angular 7 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-webpack-starter.