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.

[PR WELCOME] Dynamic rollup configuration // print descriptive error messages

See original GitHub issue

Type of Issue

[x] Feature Request

Description

Many people seem to have the same issue with various libraries: they don’t have correct rollup externals.

How To Reproduce

Look at #310, #301, #85, #119, #108, #142, #230, #163, etc…

Expected Behaviour

I suspect that a lot of these issues can be avoided by printing a more helpful error message.

Version Information

ng-packagr: v2.x.y
node: v8.x.y
@angular: v4.x.y
rxjs:
zone.js:

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:15 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
alan-agius4commented, Dec 8, 2017

Question, why not have externals in rollup be a function like the below so that all node modules are treated as externals ?

external: id => !(path.isAbsolute(id) || id.startsWith("."));

@DavidParks8, @dherges any feedback?

1reaction
dhergescommented, Dec 10, 2017

Hm. Obviously, lib.externals was driven by rollup’s external and global settings. So that’s what it was in the past.

Now, let’s switch perspective to the present. If I, as an author or maintainer of a library, write a library depending on a third-party – import { ... } from '@foo/bar'; in TypeScript code – , then I’d like to treat the third-party as a peerDependency: { "@foo/bar": "..." } and thus a rollup external – in almost every case.

There is one exception that I found and that we use in an enterprisy case: I, as a maintainer, have legacy javascript code that I’d like to embed in the bundles of my library. Why? The legacy may not be on a npm registry, it may be monkey-patched, … that sort of enterprisy things.

Why do we keep writing external when external is the 9-out-of-10 use case? Why don’t we write embedded for things we’d like to embed and treat everything else as external by default?

Read more comments on GitHub >

github_iconTop Results From Across the Web

rollup.js
Rollup is a module bundler for JavaScript which compiles small pieces of code into something larger and more complex, such as a library...
Read more >
Metadata API Developer Guide
Metadata is data that describes other data. To understand how Salesforce defines metadata, contrast business data with Salesforce metadata.
Read more >
Dynamic Dynamic SQL - Ask TOM
I don't understand what your example is trying to show here. The first loop never executes (there are no tables named MP). So,...
Read more >
How to Bundle JavaScript With Rollup — Step-by-Step Tutorial
By the end of this tutorial, we'll have Rollup configured to: combine our scripts,; remove unused code,; transpile it to work with older...
Read more >
Azure DevOps Server 2020 Release Notes - Microsoft Learn
Fix Gated check-in builds error when the Organization settings for pipeline had ... Azure DevOps Server 2020.0.2 is a roll up of bug...
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