-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
TypeError: vB(...).default is not a function #5782
Comments
Please provide a code sample to reproduce this. |
src/index.html:
src/index.src:
|
Minimal reproduction: // index.js
function x() {
require("./b");
}
const y = require("./a");
// a.js
import f from "./b";
export var foo = f();
// b.js
"use strict";
exports.__esModule = true;
exports.default = function () {};
module.exports = exports["default"]; (because we treat But the root cause is that we prefer the |
Thank you for the answer and your time, what do you think will there be a solution for this in the near future, or shall i try other possibilites such as going back to parcel 1 for example ? |
Giving ETAs for anything is always problematic 😉 One workaround would be using patch-package to remove the last line here: https://unpkg.com/browse/create-react-context@0.3.0/lib/index.js (so |
Thank you, i will try, in the meantime will be following this issue thread :) |
🐛 bug report
After running
npm run build
i receive following error from react-datepicker:TypeError: vB(...).default is not a function
With
no-scope-hoist
everything is fine.The project is a simple react project.
🎛 Configuration (.babelrc, package.json, cli command)
.babelrc:
package.json:
🤔 Expected Behavior
The source should build perfectly fine with default hoisting.
😯 Current Behavior
Error happens when trying to build with hoisting.
🌍 Your Environment
The text was updated successfully, but these errors were encountered: