-
Notifications
You must be signed in to change notification settings - Fork 15
Current WebPack configuration doesn't support TypeScript dependencies #22
Comments
I would suggest that all packages are maintained in a single repository (example). This way we can easily import the typescript packages from the workspace. I use lerna for this. If you are interested in restructuring the source code, I can contribute to this. After that it is easy to create new packages and further modularize the code base. |
@mawi12345 The reason we split in the first place, was to make it easy for others to import the scheme without the need of importing the whole of virtual-mmx. I suppose a monorepo is unavoidable; what would you recommend for the above needs? |
I would use a lerna monorepo and release the packages individually on npm. We use the same approche at work. Users can import the single packages from npm and the development / testing is easier in an monorepo. Also webpack hot reloading across the hole monorepo is possible and saves a lot of time. |
@mawi12345 do you want to take a stab at setting this up? Preserving as much of the original git history would be great, but at this stage I guess it doesn't matter too much. |
Can we not setup ts-loader for it @micahswitzer? |
Relevant discussion - microsoft/TypeScript#12358
|
As far as I get it, #34 closes this; added automatic handling by adding |
changes in webpack.config for issue #22 | tsconfig with explanatory comments,
@mozi-h I am guessing it will happen when we merge it into master. I've just merged #34 into dev. |
Because we are directly including the
vmmx-schema
in this project as a npm dependency, there is no "compilation" down to regular ES5. Because of this, if you try importing any non-type information (enums in my case), webpack will complain that it doesn't understand it.Example:
Webpack Error:
I don't know what the best way forward is from here, so I'd appreciate some input. For now I'm manually copying the enum over to my code, but this is definitely a hack and needs to be fixed as soon as possible.
The text was updated successfully, but these errors were encountered: