Bundling RC files
See original GitHub issueI think it’s necessary to mention “How to bundle RC files using systemjs.json.js file”. Because without this step, using systemjs.json.js file, will produce hundreds of round trips to the server, which is unacceptable. These gulp tasks, using gulp-typescript
and systemjs-builder
, will automate this job:
var
gulp = require("gulp"),
tsc = require("gulp-typescript"),
SystemBuilder = require("systemjs-builder");
var appFolder = "./app";
var outFolder = "wwwroot";
gulp.task("tsc", () => {
var tsProject = tsc.createProject("./tsconfig.json");
var tsResult = gulp.src([
appFolder + "/**/*.ts"
])
.pipe(tsc(tsProject), undefined, tsc.reporter.fullReporter());
return tsResult.js.pipe(gulp.dest("build/"));
});
gulp.task("system-build", ["tsc"], () => {
var builder = new SystemBuilder();
return builder.loadConfig("systemjs.config.js")
.then(() => builder.buildStatic(appFolder, outFolder + "/js/bundle.js"))
.then(() => del("build"));
});
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:15 (4 by maintainers)
Top Results From Across the Web
s6-rc - Gentoo Wiki
This file specifies one of the s6-rc's supported service types: longrun, oneshot and bundle (see service bundles). The contents of a service definition ......
Read more >bundle-config - - Set bundler configuration options
Executing bundle config set --global <name> <value> will set that configuration to the value specified for all bundles executed as the current user....
Read more >How to Bundle Non-JavaScript Resources - Bits and Pieces
Within the webpack.config.js file and rules array, we can create a new entry for CSS bundling as a child property of the module...
Read more >Bundling Configuration - SWC
SWC is able to bundle multiple JavaScript or TypeScript files into one. ... You can configure bundling using spack.config.js with similar options to...
Read more >RC-BUNDLE-100-110 - RC FILESALE
RC -BUNDLE-100-110 · 10x .ZIP Files · Happy Creating -RC-.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
after bundling, your index.html file, should look like this:
Now
js/bundle.js
contains all the angular2 related files + your application’s files (all of them). So you don’t need to addsystemjs.config.js
entry anymore. because it’s complied to a single file, usingsystemjs-builder
task. Alsojs/shims.js
now bundleses6-shim.js & zone.js & Reflect.js
files.A better solution: Introduction to Webpack It’s also able to embed all of the .html and .css files too, using the require method: