Git Product home page Git Product logo

Comments (8)

robwormald avatar robwormald commented on August 25, 2024

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.

pkozlowski-opensource avatar pkozlowski-opensource commented on August 25, 2024

can we solve the sourcemap problem upstream on angular2?

by publishing prod instead of dev to the root ?

from angular2-seed.

robwormald avatar robwormald commented on August 25, 2024

i think that's probably the best solution long term.

from angular2-seed.

pkozlowski-opensource avatar pkozlowski-opensource commented on August 25, 2024

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/rxjs

WARNING 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/rxjs

WARNING 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.

pkozlowski-opensource avatar pkozlowski-opensource commented on August 25, 2024

Sth to be fixed on the RxJS side: ReactiveX/rxjs#1089

from angular2-seed.

trodrigues avatar trodrigues commented on August 25, 2024

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.

johnwheeler avatar johnwheeler commented on August 25, 2024

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.

PatrickJS avatar PatrickJS commented on August 25, 2024

@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)

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.