Support magic import path for "generated" schemas
Closed this issue · 0 comments
milesj commented
The generated shapeshifter file (usually an index.js file) encounters a ton of churn any time a schema changes. This can cause merge conflicts when 2 separate branches generate a new output file.
Perhaps support a magic import path, like import { SomeShape } from 'shapeshifter/schemas';
, which will automatically generate the shapeshifter file during a build process (webpack), instead of including the generated file in the source code.
Pros:
- No build command needs to be run
- No file committed to source
- No possibility of conflicts
Cons:
- Breaks IDE/editor import lookups and references
- Not apparent whether a schema/type/constant is supported (unless looking for the JSON files)