Skip to content

Plugin causing spread operator to fail in jsx #7

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

Closed
ksrb opened this issue Dec 8, 2016 · 2 comments
Closed

Plugin causing spread operator to fail in jsx #7

ksrb opened this issue Dec 8, 2016 · 2 comments

Comments

@ksrb
Copy link

ksrb commented Dec 8, 2016

.babelrc

{
  "presets":[
    "react-app"
  ],
  "plugins":[
    [
      "react-css-modules",
      {
        "generateScopedName":"[path]___[name]__[local]___[hash:base64:5]"
      }
    ]
  ]
}

index.js

var test = <div {...something}></div>;

package.json
Minimal package.json can be provided if necessary 'reference' here.

Error

Module build failed: TypeError: xxx: Cannot read property 'name' of undefined
@PCreations
Copy link
Contributor

@ksrb Will be fixed when PR #12 is merged

@ksrb
Copy link
Author

ksrb commented Dec 15, 2016

Nice hopefully it'll get merged soon 😃 .

@gajus gajus closed this as completed in 4ab70fb Dec 18, 2016
gajus pushed a commit that referenced this issue Jan 6, 2017
* Make syntax parser configurable
* Make syntax parser configurable
* fix:  handle multiple file import with dynamic resolution (fixes #7 #11 #13 #14 #17) (#12)
* fix: added escape hatch when testing attribute that do not have a name property (#11)
* fix: object expression generated on dynamic resolution now use quote to escape properties' name (#14)
* fix: getClassName now works as expected when multiple file use runtime resolution
* fix: getClassName now works as expected when multiple file use runtime resolution
* fix: generate className when using runtime resolution (#18) (#19)
* fix: added escape hatch when testing attribute that do not have a name property (#11)
* fix: object expression generated on dynamic resolution now use quote to escape properties' name (#14)
* fix: getClassName now works as expected when multiple file use runtime resolution
* fix: getClassName now works as expected when multiple file use runtime resolution
* fix: className attribute is now correctly generated when using runtime resolution (#18)
* feat: improve error messages (#21)
* Make syntax parser configurable
* Merged upstream
* Updated the configuration section of the readme file
* docs: improve wording
* fix: add a missing comma

BREAKING CHANGE:

If your installation is using CSS, now you need to manually install scss-loader and configure it. https://github.com/gajus/babel-plugin-react-css-modules#configurate-syntax-loaders
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

2 participants