Git Product home page Git Product logo

sebaparedero14 / angular-umd-bundle Goto Github PK

View Code? Open in Web Editor NEW

This project forked from peterblazejewicz/angular-umd-bundle

0.0 1.0 0.0 465 KB

If you are working on a topic of trimming down size of the multiple Angular's projects, without complexity of Webpack's MF (so webpack's specific feature stays hidden), this is a project for you.

JavaScript 26.56% TypeScript 38.37% CSS 16.10% HTML 18.97%

angular-umd-bundle's Introduction

Angular UMD Bundle

This project is rework of sample by M. Gechev:

The Ivy library distribution format will no longer distribute a UMD bundle. In this repository you can find how to produce a UMD bundle for your use cases.

(which means NG >= 13 version)

Done as part of review of this particular problem: externals not working for Angular 13

If you are working on a topic of trimming down size of multiple Angular projects, without complexity of Webpack MF (so webpack specific feature stays hidden), this is a project for you:

  • custom build step to extract some dependencies out of the bundle
  • custom rollup config
  • using that different assets together (the project uses one of many possible ways to do this)

Example size of the project specific assets (without externals):

Initial Chunk Files           | Names         | Raw Size | Estimated Transfer Size
polyfills.08f1e56677fe7568.js | polyfills     | 36.22 kB | 11.53 kB
main.8446b2f654044436.js      | main          |  6.69 kB | 2.28 kB
styles.32505c4787ba148c.css   | styles        |  3.43 kB | 1.05 kB
runtime.6a44049d9ab1c63f.js   | runtime       |  1.04 kB | 599 bytes
                              | Initial Total | 47.39 kB | 15.45 kB

Build scripts

In this order:

npm run build:rollup

(next your specific script):

npm serve
npm build

or event tests:

npm test

Development server

Run ng serve for a dev server. Navigate to http://localhost:4200/.

Build

Run ng build to build the project. The build artifacts will be stored in the dist/ directory.

Running unit tests

Run ng test to execute the unit tests via Karma.

Running end-to-end tests

Run ng e2e to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.

Author

@peterblazejewicz

angular-umd-bundle's People

Contributors

peterblazejewicz avatar

Watchers

James Cloos avatar

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.