Code Monkey home page Code Monkey logo

Comments (5)

Foxandxss avatar Foxandxss commented on August 28, 2024

The problem is that webpack disagrees by bundling angular2-polyfills becaut it says that it is a bundle already and you should link the original sources (zone and reflect).

from angular2-seed.

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

I understand that this suggestion doesn't quite match WebPack's philosophy. But in this case this philosophy is wrong. And we really don't want to re-package zone.js

We can't tell people "hey, you can't include anything in a script tag since WebPack has a different opinion". What about things like es6-shim? Are we going to force people to bundle it as well?

from angular2-seed.

Foxandxss avatar Foxandxss commented on August 28, 2024

As long as your solution is not extra script tags, that won't work for building a production build with webpack. Or change the entire webpack.

from angular2-seed.

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

It is not re-bundled any more which is good. But it is still not loaded via a script tag, which is bad. Will open a separate issue for this.

from angular2-seed.

PatrickJS avatar PatrickJS commented on August 28, 2024

crypto is being imported because of the way reflect-metadata is handling the polyfill. To ensure that webpack doesn't polyfill the browser environment with node (browserify does the same) we have to noop crypto with

module.exports = {
  node: { crypto: 'empty' }
};

you can see it here https://github.com/angular/angular2-seed/pull/28/files#diff-11e9f7f953edc64ba14b0cc350ae7b9dR30

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.