c8r / kit

Tools for developing, documenting, and testing React component libraries

Home Page:https://compositor.io/kit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`--mode library` asking for "an appropriate loader"

VinSpee opened this issue · comments

Hi again!

I'm successfully running kit in its default mode. I tried to run it in library mode:

❯ yarn kit components --mode library
yarn run v1.7.0
$ /Users/vincentspeelman/Projects/TED/kit-test/kit-kit/node_modules/.bin/kit components --mode library
 kit  @compositor/kit-cli
 kit  ⠋ starting dev server...(node:82768) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
 kit  ⠏ starting dev server...✖ 「wdm」:
ERROR in ../node_modules/@compositor/kit-cli/src/Library.js 19:6
Module parse failed: Unexpected token (19:6)
You may need an appropriate loader to handle this file type.
|
|     return (
>       <Library {...props} examples={examples} />
|     )
|   }
 @ ../node_modules/@compositor/x0/lib/entry.js 217:48-60 217:72-84
 @ multi ../node_modules/@compositor/x0/lib/entry

It looks like kit is't picking up my .babelrc (or its own?)

here's my .babelrc:

{
  "presets": [
    "env",
    "stage-0",
    "react"
  ],
  "env": {
    "production": {
      "plugins": [["emotion", { "hoist": true }]]
    },
    "development": {
      "plugins": [
        ["emotion", { "sourceMap": true, "autoLabel": true }]
      ]
    }
  }
}

am I doing something wrong?

my bad. I'm good at programming i promise.

@VinSpee Hey VinSpee, I was wondering what the issue with this was?

@philkeys I was in the wrong folder :-)

Are you having a similar issue?

@VinSpee Yeah I am. What folder did you need to be in when calling that?

Same problem here.

Same here.