Closed MangelMaxime closed 6 years ago
Hmm, not sure what's happening. There was a problem with the module names in the Editor project but that didn't fix that. I also tried changing the name exports
in case it caused a conflict with Webpack but that wasn't the solution either. Finally I just solved by adding directly a project reference :/
Yes this is really strange because, when I tried to access editor
in the global scope in the browser. I didn't saw the editor.defaults
or editor.exports
like if webpack or fable was erasing this variable.
But I was able to see editor.create
, editor.parseEditor
, etc. as Fable export by default everything. I don't really understand neither. Should we use the project reference so ? Only, problem is it's will probably make webpack bundling slower (more files to bundle etc.).
I don't know either, I'll try to investigate later. Anyway, yes, for this case a project reference (or maybe just a single project) should be enough. There are not many more files than a medium size Fable app. I think I made the structure like this at the beginning because I was thinking in making the editor a component that could be embedded in any other web, but we can deal with that later :+1:
I am closing this PR because, the change have already been included in the new repl
@alfonsogarciacaro If you build this version of the REPL you will see my problem with the
ExportDefault
not working.If you can help me fix it inside this PR would be awesome :)