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.

Warning or error when trying to transpile a function without losing business logic

See original GitHub issue

🚀 Feature Proposal

Warning or error when trying to transpile a function without losing business logic

Motivation

We used additional business logic for loading a chunk in the loadFn, and everything worked well until we included @loadable/babel-plugin We had an application crashing for a long time when trying to resolve the same component If there was a warning or an error about the impossibility of transpiling the function code without breaking the business logic, we would have discovered the problem much earlier.

Example

An attempt to transpile such a function should cause warning or an error:

async function load(context: IApplicationContext) {
  const fragmentsPromise = loadFragmentsAPI(context);
  const { runApp } = await import('../runApp');
  const mdl = await runApp(context);
  await fragmentsPromise;

  return mdl.default;
}

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
theKasheycommented, Jun 22, 2021

Definitely not a patch as it can be a breaking change for someone.

So technically speaking, even if SSR was/is/will never work with “custom logic” in import - CSR is ok, and we need an option for babel plugin (not active by default) to disable this check and keep everything as it was.

0reactions
stale[bot]commented, Aug 22, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use iife for browser and cjs for node · Issue #470 - GitHub
UMD bundle In this issue I want to show you why the UMD is not working in its current state (466), why we...
Read more >
The 10 Most Common JavaScript Issues Developers Face
If you need help figuring out why your JavaScript isn't working, consult this list of the 10 most common JavaScript issues from a...
Read more >
My create-react-app is failing to compile due to ESLint error
This issue has been fixed in the react-scipts:"4.0.3" but, the eslint errors present in the project are not converted to warnings by default ......
Read more >
Error message when a business logic handler is used in SQL ...
This issue occurs because the DateTime2 values are stored in a variable of data type string when data is passed between managed code...
Read more >
Turning the safety valve up with types - Tooploox
The above code is already written in es6 and it will not run in the browser nor node . It needs to be...
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