Skip to content

Instantly share code, notes, and snippets.

@cagb80
Last active April 24, 2023 14:48
Show Gist options
  • Save cagb80/ecee5756cf9ee675c09ae4927f4e05cc to your computer and use it in GitHub Desktop.
Save cagb80/ecee5756cf9ee675c09ae4927f4e05cc to your computer and use it in GitHub Desktop.
Angular
# Change BIN with the SubFolder Address
RewriteEngine On
RewriteBase /BIN/
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /BIN/index.html [L]
# PREVENT CACHE
<FilesMatch "\.(js|css|json|xml|gz|html)$">
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
Header set Pragma "no-cache"
Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT"
</FilesMatch>
npm install bootstrap bootstrap-icons
"styles": [
"node_modules/bootstrap/scss/bootstrap.scss",
"node_modules/bootstrap-icons/font/bootstrap-icons.css",
"src/styles.scss"
],
"scripts": [
"node_modules/bootstrap/dist/js/bootstrap.bundle.min.js"
]
ng build --output-hashing=none --resources-output-path=assets
#INSIDE A BIN
ng build --output-hashing=none --base-href "BIN" --resources-output-path=assets
OR
add inside angular.json in architect->build->options
"baseHref": "/BIN/",
RUN ng build --output-hashing=none --resources-output-path=assets
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment