如何在没有 webpack fable-loader 的情况下使用 Fable 编译器?
How to use Fable compiler without webpack fable-loader?
我正在试验 F# 并使用 Fable 编译为 JavaScript。到目前为止这个故事很好。但是,我有一些项目不使用 Webpack 捆绑器,但我希望使用 Fable。 NPM 模块 fable-compiler
不公开任何 CLI 命令来将简单的 .fs
文件编译为 .js
文件。
我想知道这是否可能。如果是,如何?基本上,我需要一个简单的输出,就像 Fable REPL
生成的方式一样,即为每个 .fs
文件并排生成不同的 .js
文件。
Ideally, I assume it should be similar to BuckleScript/Reason compiler but I could not find any documentation so far.
您可以使用 fable-splitter 包代替 fable-compiler
。
使用起来就像fable-splitter myProject.fsproj -o outputDir
一样简单
可以找到使用此方法的示例项目 here。
我正在试验 F# 并使用 Fable 编译为 JavaScript。到目前为止这个故事很好。但是,我有一些项目不使用 Webpack 捆绑器,但我希望使用 Fable。 NPM 模块 fable-compiler
不公开任何 CLI 命令来将简单的 .fs
文件编译为 .js
文件。
我想知道这是否可能。如果是,如何?基本上,我需要一个简单的输出,就像 Fable REPL
生成的方式一样,即为每个 .fs
文件并排生成不同的 .js
文件。
Ideally, I assume it should be similar to BuckleScript/Reason compiler but I could not find any documentation so far.
您可以使用 fable-splitter 包代替 fable-compiler
。
使用起来就像fable-splitter myProject.fsproj -o outputDir
可以找到使用此方法的示例项目 here。