New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(NodePart): factory method created to help us when creating NodePart introduced due to scope hoisting problem with ParcelJS #954
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here (e.g. What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
I signed it! |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
bd5eae0
to
6008292
Compare
…rt, introduced due to scope hoisting problem with ParcelJS
6008292
to
8cf8e95
Compare
I think this issue is related with how typescript compile this part of the code. |
This isn't a bug with lit-html, and adds unnecessary lines of code. We should wait for the bugfix in Parcel. |
I understand! What i cannot understand is why typescript doesn't put Regards! |
Other strange thing is this When typescript compile export class NodePart {} Will be compiled to: "use strict";
Object.defineProperty(exports, "__esModule", { value: true });
class NodePart {
}
exports.NodePart = NodePart;
//# sourceMappingURL=index.js.map What it works ?!? "use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.NodePart = class NodePart {
}
//# sourceMappingURL=index.js.map Do you know why they decided this approach ? |
@justinfagnani closing since Parcel Team confirmed that it is a bug in the renaming when tree shaking the whole bundle. parcel-bundler/parcel#3172 (comment) Thank you for your fast answer and correct resolution of the problem! Regards! |
Original Issue ParcelJS
Description
The problem here is that when compiled this part of code remains the same without
export
referencing him to themodule
scope
Typescript
Javascript
Instead it should be
The case here is that i am getting the following error
Type of change
Checklist:
Example repository of the problem:
https://github.com/Stradivario/parcel-scope-hoisting
Regards! :)