Get support for soyuka/repro-default-export
If you're new to LTH, please see our FAQ for more information on what it is we do.
Support Options
Unfortunately, there are currently no active helpers for this repository on the platform. Until they become available, we reccomend the following actions:
View Open IssuesTake a look to see if anyone else has experienced the same issue as you and if they managed to solve it.
Open an IssueMake sure to read any relevant guidelines for opening issues on this repo before posting a new issue.
Sponsor directlyCheck out the page and see if there are any options to sponsor this project or it's developers directly.
soyuka/repro-default-export
Bug Reproduction repository
Related issues:
- https://github.com/trueadm/inferno/issues/596
- https://github.com/rollup/rollup/issues/1156
- https://github.com/Microsoft/TypeScript/issues/13017
Install
run bash init.sh
What's wrong?
In src/index.ts
:
import createElement from 'inferno-create-element'
import Component from 'inferno-component'
console.log(createElement)
console.log(Component)
createElement
and Component
should have the value of the related package default export.
Though, if you run node dist/bundle.js
, you'll get undefined
If you check out the compiled file, you will see something like:
const inferno_create_element_1 = __webpack_require__(3);
const inferno_component_1 = __webpack_require__(2);
console.log(inferno_create_element_1.default);
console.log(inferno_component_1.default);
But, rollup (which is used by Inferno) doesn't export any default:
true ? module.exports = factory(__webpack_require__(0)) :
typeof define === 'function' && define.amd ? define(['inferno'], factory) :
(global.Inferno = global.Inferno || {}, global.Inferno.createElement = factory(global.Inferno));
An alternative is to use the following import statements:
import * as createElement from 'inferno-create-element'
import * as Component from 'inferno-component'
console.log(createElement)
console.log(Component)
But by using this, typescript expects Objects and the module signatures are wrong, and therefore blocking the compilation.
For example, you won't be able to extend Component
, because it's not recognized as a class.
Version used:
- typescript@2.1.4
- webpack@^2.1.0-beta.25
- trueadm/inferno#master
Our Mission
We want to make open source more sustainable. The entire platform was born from this and everything we do is in aid of this.
From the Blog
Interesting Articles
-
Generating income from open source
Jun 23 • 8 min read
-
2023 State of OSS
Apr 23 • 45 min read ★
-
A funding experiment...
Aug 19 • 10 min read
-
But You Said I could
Aug 19 • 2 min read
Thank you for checking out LiveTechHelper |
2025 © lth-dev incorporated
p-e622a1a2