-
Notifications
You must be signed in to change notification settings - Fork 311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fable-splitter doesn't seem to preserve folder structure #1333
Comments
When @ncave wrote fable-splitter the purpose wasn't to replicate the folder structure, just to generate different files for cases where the bundle size was too big (e.g. when compiling the REPL) or when there's already another bundler (e.g. React Native). Because of this the solution was an almost-flattened structure where only the last folder of the file is used. This has been enough for fable-splitter use cases so we haven't revisited this. Trying to replicate the folder structure in Fable 0.7 gave me a lot of headaches because there are many edge cases (e.g. you can have two files named |
Thank you for the detailed response as always. And thanks for pointing to where i should get started. Is there a set of tests that exercise fable-splitter? |
No, sorry. Actually we don't have tests for any of the JS clients (Webpack, Rollup, splitter) besides the fact that Fable tests are being bundled with Webpack. Integration tests is one of the things we're really missing... 😕 |
Related: #1648 (comment) BTW, now there's one! test for fable-splitter here, maybe we can add another one after fixing the folder structure. |
Since this is Fable 2 related I'm ok with closing if you want 👍 |
Thanks @TheAngryByrd! Ok, let's close this. Hopefully the folder structure in Fable 3 works for you. There's still some mangling to prevent file duplication in some cases, but for the most part it should reflect the original structure 👍 |
Description
Given the structure
fsproj
I get the output:
Repro code
https://github.com/TheAngryByrd/FableInLegacyApps
cd src && dotnet restore && dotnet fable npm-run splitter
Expected and actual results
I would expect the output
feature1
andfeature2
folders to be under aPages
folder not the root output directory.Related information
dotnet fable --version
):The text was updated successfully, but these errors were encountered: