xstate-codegen icon indicating copy to clipboard operation
xstate-codegen copied to clipboard

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

Open pyoner opened this issue 5 years ago • 2 comments

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"
}

pyoner avatar Oct 10 '20 12:10 pyoner

Nice. This looks fine to add.

Probably also needs one for react too.

mattpocock avatar Oct 10 '20 16:10 mattpocock

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

pyoner avatar Oct 11 '20 04:10 pyoner