You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1.Run npm start (to have server started)
2. Run npm run build command
3. Try to refresh the page after build is success
4. You will get the following error Uncaught ReferenceError: NodePart is not defined
5. Then run command npm run fix and wait for build to finish
6. Refresh the page and you will se that the application is working properly
npm run fix
This command copy file with exports.NodePart property to node_modules folder and then rerun parcel build ./src/index.html --public-url=/flags --experimental-scope-hoisting
Why this thing happen ? Anyone ?
馃實 Your Environment
Software
Version(s)
Parcel
1.12.3
Node
10.16.0
npm
6.9.0
Operating System
Ubuntu 18.4.2
The text was updated successfully, but these errors were encountered:
Stradivario
changed the title
Statically exported members used internally inside the class scope should have exports mapped to module scope when bundled
[ScopeHoisting] Statically exported members used internally inside the class scope should have exports mapped to module scope when bundled
Jun 28, 2019
馃悰 bug report
馃帥 Configuration (.babelrc, package.json, cli command)
package.json
tsconfig.json
馃 Expected Behavior
Statically exported members used internally inside the class scope should have
exports
mapped to module scope when bundled馃槸 Current Behavior
Statically exported members are not mapped internally inside the scope of the current Class which leading to
property of undefined
example:
This peace of code is taken from https://github.com/Polymer/lit-html/blob/master/src/lib/parts.ts#L145
Important part is here:
https://github.com/Polymer/lit-html/blob/master/src/lib/parts.ts#L311
They are creating new Instance of the class NodePart as a factory if this particular part doesn't exist inside the DOM.
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
When i change the code with exports.NodePart everything is back to normal and i can use my application with Scope hoisting.
Is this normal to behave like this ?
Is it a problem with implementation and how Typescript compile the code without exports.NodePart ?
Is this issue for Typescript team or ParcelJS ?
here is a simple repository reproducing the problem
https://github.com/Stradivario/parcel-scope-hoisting
1.Run npm start (to have server started)
2. Run
npm run build
command3. Try to refresh the page after build is success
4. You will get the following error
Uncaught ReferenceError: NodePart is not defined
5. Then run command
npm run fix
and wait for build to finish6. Refresh the page and you will se that the application is working properly
This command copy file with
exports.NodePart
property tonode_modules
folder and then rerunparcel build ./src/index.html --public-url=/flags --experimental-scope-hoisting
Why this thing happen ? Anyone ?
馃實 Your Environment
The text was updated successfully, but these errors were encountered: