Comments (8)
can we solve the sourcemap problem upstream on angular2? we should really have .js
, .map.js
and .d.ts
being distributed to npm. anything else is gonna require a bunch of configuration for end users.
from angular2-seed.
can we solve the sourcemap problem upstream on angular2?
by publishing prod instead of dev to the root ?
from angular2-seed.
i think that's probably the best solution long term.
from angular2-seed.
So, was trying to see what we can do on this repo side (till the decision is made in the main repo) with:
preLoaders: [
{test: /\.js$/, loader: 'source-map-loader'}
]
but getting flooded with:
WARNING in ./~/rxjs/Observable.js
Cannot find source file '../../src/Observable.ts': Error: Cannot resolve 'file' or 'directory' ../../src/Observable.ts in /home/pk/work/gitrepos/gh/pkozlowski-opensource/angular2-seed/node_modules/rxjsWARNING in ./~/rxjs/Subject.js
Cannot find source file '../../src/Subject.ts': Error: Cannot resolve 'file' or 'directory' ../../src/Subject.ts in /home/pk/work/gitrepos/gh/pkozlowski-opensource/angular2-seed/node_modules/rxjsWARNING in ./~/rxjs/add/operator/map.js
Cannot find source file '../../../../src/add/operator/map.ts': Error: Cannot resolve 'file' or 'directory' ../../../../src/add/operator/map.ts in /home/pk/work/gitrepos/gh/pkozlowski-opensource/angular2-seed/node_modules/rxjs/add/operator
It looks like source maps might be off in the rxjs repo
from angular2-seed.
Sth to be fixed on the RxJS side: ReactiveX/rxjs#1089
from angular2-seed.
Wouldn't this problem be fixed if you told the webpack config not to ignore node_modules/angular2 and if you turned on sourcemaps on the tsconfig.json for development (and also told it not to exclude all of node_modules as is the case right now)?
Then you'd get sourcemaps for the development setup, and for the production setup you could just use the same sources but turn off sourcemaps.
from angular2-seed.
Hello, I was wondering if there is yet a way to shrink the vendor.bundle.js size? I added
preLoaders: [{
test: /\.js$/,
loader: 'source-map-loader'
}],
to my webpack config and ran into the same problems referenced above, so it appears the RxJS support is still not ready. Is there anything I can do in the interim?
from angular2-seed.
@johnwheeler I added the source-map-loader to correctly map the inline source maps provided by angular2 which cut the vendor size in half. The build time is slower because we have to deal with the inline source maps. I also have to exclude rxjs and angular2-material until their source maps are fixed. closing for now
from angular2-seed.
Related Issues (20)
- Why is twitter bootstrap in the package?
- Build production HOT 2
- can not register ngx-uploader
- error when i start npm HOT 4
- Nothing happens after npm start / only Loading is displayed
- Err: unable to start
- Words of appreciation
- Reducing the size of the generated file for Prod deployments HOT 1
- How to import ng2-bootstrap with webpack HOT 1
- how to integrate my site on ligne
- npm install Error - shasum check failed
- Import node module HOT 1
- unable to start project on my system HOT 2
- Inactive/Dead? HOT 3
- Problem Install npm ; "npm install" HOT 1
- Failed at the [email protected] start script
- Include sass
- Angular 5 will be supported?
- Cannot read property 'config' of null HOT 1
- problem with lazy loading
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 angular2-seed.