0

Created a new angular project using 'ng new' command on Angular 6.1. After running 'ng build' command, 5 js files are produced: runtime.js, polyfills.js, styles.js, vendor.js, main.js.

How do I add another library into vendor.js, For example, bootstrap?

1

1 Answer 1

1

vendor.js is a compiled file which angular generates for you, any libraries which you have imported to your project either they are angular libraries or 3rd parties libraries(bootsrap, lodash) compiled into a single vendor.js file.

So whenever you include the new 3rd party library to your project, angular doesn't create new vendor file, angular just compliled your new imported library and put into vendor bundle at the time of build.

To import bootstrap to your project refer to this answer: How to add bootstrap to an angular-cli project

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.