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 only uses last file in project #1165
Comments
In general Fable clients (Webpack loader, Rollup plugin, fable-splitter) start compiling the last file in the project and only request other files if they're being referenced. This is consistent with how JS projects work where there's an entry file that acts as the public interface for the project/package. However, I also want to add the option to fable-splitter to compile all files in the project (or at least all in the base directory) for special cases (like tests projects). Until this is ready there's a little hack to make sure all projects will get compiled which is using an empty import (actually named |
I've published fable-splitter 0.1.19 which accepts the following config to force compilation of all project files even if they're not referenced, could you please give it a try? (You also need to upload Fable to 1.2.4) module.exports = {
...
fable: {
...
extra: { allFiles: true }
}
}; |
Thanks Alfonso, it worked! I did kinda wish As a last remark for anyone trying to do the same the
|
Ups, thanks for pointing that out @nojaf! Actually that's my mistake I think it should go into |
Sorry for so many changes but I realized module.exports = {
entry: ...,
outDir: ...,
babel: ...,
fable: ...,
allFiles: true
} |
Tested the |
I was attempting to do the same as this issue but i'm only getting one file out. my splitter config
Am I overlooking something obvious? |
@TheAngryByrd Latest Fable is |
@Zaid-Ajaj just did a |
You're right, it's not working 😕 Latest Fable is not returning the list of files for the .fsproj. I must have broken something, sorry! 😅 I'll check... |
Hmm, apparently I removed that to fix #1241. Let's see if we can find a solution that solves both problems... |
This should be fixed now, please update Fable to 1.3.8 and fable-splitter to 0.1.21 and tell me if you have any problem 👍 |
I've tested this and it worked. I do think that the |
@nojaf Thanks for checking! I think Fable.Elmish.React stable has to update the dependency to Fable.React 2. What problem do you have for Fable.PowerPack? |
Awesome! Powerpack error I'm getting from the same project above (without using a Main.fs file)
|
Ah, ok. Nobody uses that module so the error only surfaces if you use the |
Description
I'm trying to create multiple js files from a fsproj using
fable-splitter
.My fsproj:
Repro code
App.fs
Helper.fs
splitter.config.js
Expected and actual results
Expected
Two files (App.js and Helper.js) inside the
splitted
folder.Actual
Only the last item in the
fsproj
is being compiled.Related information
dotnet fable --version
): 1.2.3The text was updated successfully, but these errors were encountered: