Coder Social home page Coder Social logo

fractal-react-adapter's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

fractal-react-adapter's Issues

Error: Cannot find module '@button'

Hi Sumul,

unfortunately, I cannot get the fractal-react-adapter running. I followed the instructions in your README and I keep getting the following error in the Cart component:

Error: Cannot find module '@button' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15) at Function.Module._load (internal/modules/cjs/loader.js:562:25) at Module.require (internal/modules/cjs/loader.js:690:17) at require (internal/modules/cjs/helpers.js:25:18) at Object. (D:/PROJECTS/myProject/fractal-component-library/src/components/05-examples/01-react-components/card.jsx:3:16) at Module._compile (internal/modules/cjs/loader.js:776:30) at loader (D:\PROJECTS\myProject\fractal-component-library\node_modules\babel-register\lib\node.js:144:5) at Object.require.extensions.(anonymous function) [as .jsx] (D:\PROJECTS\myProject\fractal-component-library\node_modules\babel-register\lib\node.js:154:7) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3) at Module.require (internal/modules/cjs/loader.js:690:17) at require (internal/modules/cjs/helpers.js:25:18) at ReactAdapter.render (D:\PROJECTS\myProject\fractal-component-library\node_modules\fractal-react-adapter\src\adapter.js:61:23)

Could you please provide any help?

Thanks and kind regards,

Alex

Should use _.merge in place of _.assign

https://github.com/sumul/fractal-react-adapter/blob/master/src/adapter.js#L99

Otherwise it's not possible to specify custom plugins via babelConfig, eg:

const reactAdapter = require('fractal-react-adapter')({
  babelConfig: {
    extensions: ['.jsx'],
    presets: ['es2015', 'es2017', 'stage-3', 'react'],
    plugins: ['transform-class-properties']
  }
});

Or use _.merge on the entire DEFAULT_OPTIONS: https://github.com/sumul/fractal-react-adapter/blob/master/src/adapter.js#L117

ES6 Imports

First off, love this. It's almost perfect for what I need, however I noticed the adapter supports ES6 imports just fine, but doesn't seem to support ES6 exports. Any particular reason for this, or am I just missing something?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.