prodo-dev / prodo

Prodo is a React framework to build apps faster.
https://docs.prodo.dev
MIT License
115 stars 5 forks source link

Using model inside function does not work #133

Closed coffee-cup closed 4 years ago

coffee-cup commented 4 years ago

If I use the model inside a function, it gets transpiled away

import { mode } from "./model";
const foo = () => {
  const { store } = model.createStore(/* ... */);
}

This should not happen because model is a valid import.

coffee-cup commented 4 years ago

@tdawes I've also noticed issues when importing TypeScript enums from the model file. I am assuming it is because they are being stripped out too. Should we just advise that users do not export anything else from the model file? Or could we not remove the imports?