mattpocock / xstate-codegen

A codegen tool for 100% TS type-safety in XState
MIT License
245 stars 12 forks source link

Error: 'Machine' is not exported by node_modules/@xstate/compiled/index.js (rollup) #56

Open pyoner opened 3 years ago

pyoner commented 3 years ago

Problem: Rollup cannot import {Machine} from "@xstate/compiled"

How to fix? I added a index.es.js file:

export * from  "xstate"

And patched package.json:

{
  "name": "@xstate/compiled",
  "main": "index.js",
  "module": "index.es.js",
  "version": "0.0.4"
}
mattpocock commented 3 years ago

Nice. This looks fine to add.

Probably also needs one for react too.

pyoner commented 3 years ago

I have added a template index.es.js only in the PR #57