Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

With experimental-scope-hoisting, no maps generated and Uncaught ReferenceError: React is not defined #2389

Closed
ghost opened this issue Dec 10, 2018 · 3 comments

Comments

@ghost
Copy link

ghost commented Dec 10, 2018

馃悰 bug report

When using the following command:

parcel build index.html --experimental-scope-hoisting --detailed-report --public-url ./

No source maps are produced and react doesn't work:

Uncaught ReferenceError: React is not defined

馃帥 Configuration (.babelrc, package.json, cli command)

{
  "presets": ["@babel/preset-env", "@babel/preset-react"],
  "plugins": [
    "@babel/plugin-transform-runtime",
    "@babel/plugin-proposal-class-properties",
    ["@babel/plugin-proposal-decorators", {"legacy": true}],
    "babel-plugin-styled-components"
  ]
}

馃 Expected Behavior

It should generate source maps and define React

馃槸 Current Behavior

No source maps are produced and react doesn't work.

馃拋 Possible Solution

馃敠 Context

馃捇 Code Sample

馃實 Your Environment

Software Version(s)
Parcel 1.10.3
Node 10
npm/Yarn 6.4.1
Operating System Win7
@DeMoorJasper
Copy link
Member

DeMoorJasper commented Dec 12, 2018

Source maps are not being produced as this was causing performance issues and added an extra layer of complexity to an experimental feature we鈥檇 like to make stable first.

About the react issue I think it has already been reported

Sent with GitHawk

@mischnic
Copy link
Member

mischnic commented Dec 13, 2018

The React part was fixed by #2292 (can't test it without your code). Sourcemap support for tree shaking is tracked in #1564

@XGHeaven
Copy link

XGHeaven commented Dec 16, 2018

@mischnic When to publish a new version? I found the latest version still is 1.10.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants
@DeMoorJasper @mischnic @XGHeaven and others