Angular5 - specifying css or javascript asset for bundling to deployed offline

Say you have a bunch of css and javascript files which you need to deploy as offline asset. Meaning the target server does not have access to internet. What do you do?

You can change your ".angular-cli.json" file and under the section "styles", update path to your assets in src folder. Yeap, it starts looking in your src folder and you can tell I have a folder called "assets".

"index": "index.html",
"main": "main.ts",
"polyfills": "polyfills.ts",
"test": "test.ts",
"tsconfig": "",
"testTsconfig": "tsconfig.spec.json",
"prefix": "app",
"styles": [
"styles.css", "assets/bootstrap.css"
"scripts": ["assets/jquery-3.2.1.slim.min.js", "assets/popper.min.js", "assets/bootstrap.min.js"],
"environmentSource": "environments/environment.ts",
"environments": {
"dev": "environments/environment.ts",
"prod": "environments/"


Popular posts from this blog

ionic2 cordova build android - Unable resolve gradle 2.2.3

A quick tutorial for OWASP ZAP tool for beginners