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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Defunct with parcel, babel 7 #50

Open
mzedeler opened this issue Sep 17, 2019 · 0 comments
Open

Defunct with parcel, babel 7 #50

mzedeler opened this issue Sep 17, 2019 · 0 comments

Comments

@mzedeler
Copy link

This modules doesn't play well with parcel and babel 7.

package.json:

{
  ...
  "main": "src/index.js",
  "scripts": {
    "start": "parcel html/index.html"
  },
  "devDependencies": {
    "@babel/core": "^7.6.0",
    "@babel/plugin-proposal-class-properties": "^7.5.5",
    "@babel/preset-env": "^7.6.0",
    "@babel/preset-react": "^7.0.0",
    "eslint": "^6.4.0",
    "eslint-config-standard": "^14.1.0",
    "eslint-plugin-import": "^2.18.2",
    "eslint-plugin-jsx": "^0.1.0",
    "eslint-plugin-node": "^10.0.0",
    "eslint-plugin-promise": "^4.2.1",
    "eslint-plugin-react": "^7.14.3",
    "eslint-plugin-standard": "^4.0.1",
    "parcel-bundler": "^1.12.3"
  },
  "dependencies": {
    "react": "^16.9.0",
    "react-dom": "^16.9.0",
    "react-trello": "^2.2.3"
  }
}

.babelrc:

{
  "presets": ["@babel/preset-env", "@babel/preset-react"],
  "plugins": ["@babel/plugin-proposal-class-properties"]
}

If I import react-click-outside with the settings above, I get this error:

react-click-outside/build/index.js: Plugin/Preset files are not allowed to export objects, only functions. In /home/mike/workspace/burnmaster/node_modules/react-click-outside/node_modules/babel-preset-react/lib/index.js

I have no idea why this happens. I've tried to reproduce the issue using normal require with babel-node, but I couldn't get it to produce the same error.

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

No branches or pull requests

1 participant