question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Omit angular from build

See original GitHub issue

Due to the environment of the SPA I am developing, AngularJS is included per script tag by default. However, I have no option of including ngVue as script tag. Is there a way to initialize ngVue using require without also importing angular?

Console throws:

WARNING: Tried to load angular more than once.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
janwirthcommented, May 17, 2017

I fixed this by adding this to my webpack config

      alias: {
        angular: __dirname + "/vue/angular"
      },

and /vue/angular contains

module.exports = window.angular
2reactions
Jexordexancommented, May 17, 2017

I found that fix in this bug: https://github.com/webpack/webpack/issues/2134

Read more comments on GitHub >

github_iconTop Results From Across the Web

Exclude files from build in Angular 2 - Stack Overflow
How to exclude files from the Angular build using Angular-CLI. I've just added the path to exclude in the tsconfig.json and tsconfig.app.json files, ......
Read more >
How to exclude some files from ng build · Issue #6050 - GitHub
How to exclude some files from ng build ? My case is I will replace some js file dynamically in docker volume. For...
Read more >
ng build - Angular
Option Description Value Type Default Value ‑‑aot Build using Ahead of Time compilation. boolean true ‑‑base‑href Base url for the application being built. string ‑‑delete‑output‑path Delete...
Read more >
Documentation - Utility Types - TypeScript
Omit <Type, Keys>. Released: 3.5. Constructs a type by picking all properties from Type and then removing Keys (string literal or union of...
Read more >
Introduction to Omit typescript utility types - DEV Community ‍ ‍
The Omit utility construct a type by picking all properties from type and then removing keys. This... Tagged with typescript, nextjs, node, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found