-
Notifications
You must be signed in to change notification settings - Fork 16
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
Unable to use without babel-preset-es2015 #11
Comments
Hey, @vkbansal , can I get some more information on how you're using shallowequal? is it in webpack? |
Yes, I'm using webpack. My build worked when I deleted |
@vkbansal I'm unable to re-produce this issue... I tried to create a quick app using create-react-app and added shallowequal as a dependency. And ran |
I'll try to create an reproducible project and update you |
Thanks that'd be helpful 👍 I'm genuinely interested to see if my babel config is incorrect (or needs fixing) since it's only meant for tests. |
Here you go: https://github.com/vkbansal/se-test
|
@vkbansal so I did some investigating. It appears you would need to do the following changes in your webpack (i.e. change from diff --git a/webpack.config.js b/webpack.config.js
index 0a862b1..b6f59dd 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -24,6 +24,7 @@ let config = {
use: [{
loader: 'babel-loader',
options: {
+ // babelrc: false,
presets: [
['env', {
targets: {
@@ -35,7 +36,7 @@ let config = {
}
}],
exclude: [
- 'node_modules'
+ /node_modules/
]
}
] I haven't used string-based conditions before in webpack (only regex ones): https://webpack.js.org/configuration/module/#condition https://webpack.js.org/configuration/module/#rule-exclude I also tried In addition, I tried whitelist approach (only include the |
Thanks. I learnt something new today. |
I also get this issue using shallowequal v1.0.1 with React Native. The React Native packager tries to consume all babel configs by default, and unfortunately it can't be turned off (as suggested above with webpack). If you were to use a |
And ignore it when publishing. Fixes dashed#11.
@cooperka oh interesting! I'll go ahead and merge your PR and cut a release soon. |
@cooperka I've released shallowequal with your PR at |
So quick! Thanks a lot @dashed. |
Getting the following error
I'm using
babel-preset-env
and notes2015
The text was updated successfully, but these errors were encountered: