Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

a way to ignore glyphicons with ng build #6147

Closed
anandchakru opened this issue May 2, 2017 · 4 comments
Closed

a way to ignore glyphicons with ng build #6147

anandchakru opened this issue May 2, 2017 · 4 comments

Comments

@anandchakru
Copy link

Bug Report or Feature Request (mark with an x)

- [ ] bug report -> please search issues before submitting
- [x] feature request

Versions.

@angular/cli: 1.0.0-rc.4
node: 7.4.0
os: linux x64

Repro steps.

Follow the steps/command below:

ng new Eg1

cd Eg1

npm install -s bootstrap

Add ,"../node_modules/bootstrap/dist/css/bootstrap.css" into .angular-cli.json's apps.styles

ng build

cd dist

ls -la | awk {'print $9'}

..
favicon.ico
glyphicons-halflings-regular.448c34a56d699c29117a.woff2
glyphicons-halflings-regular.89889688147bd7575d63.svg
glyphicons-halflings-regular.e18bbf611f2a2e43afc0.ttf
glyphicons-halflings-regular.f4769f9bdb7466be6508.eot
glyphicons-halflings-regular.fa2772327f55d8198301.woff
index.html

cd ../

npm uninstall -s bootstrap

Remove ,"../node_modules/bootstrap/dist/css/bootstrap.css" from .angular-cli.json's apps.styles

ng build

cd dist

ls -la | awk {'print $9'}

..
favicon.ico
index.html

The log given by the failure.

Observe that there are glyphicons*.* files when bootstrap is included, how to ignore glyphicons with ng build ?

Desired functionality.

A way to ignore glyphicons while using ng-build

Mention any other details that might be useful.

@grizzm0
Copy link
Contributor

grizzm0 commented May 3, 2017

glyphicons is referenced in bootstrap.css. This is just webpack/AngularCLI doing it's thing including all files needed for your CSS.

It doesn't really hurt that it's there other than OCD, does it? :p If you really want to remove it you could build from less/sass instead. Copy bootstrap.less/sass into your project and change all the imports to point to the correct files then remove @import "bootstrap/glyphicons";.

@filipesilva
Copy link
Contributor

As @grizzm0 said, boostrap references glyphicons so they are included. This is intended behaviour.

@anandchakru
Copy link
Author

Can we not still have a way to provide some excludes while building (example: ng build --exclude glyph*) or mention it in .angular-cli.json

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants