SAFE-Stack / SAFE-Nightwatch

Demo of SAFE-Stack applied to React Native for cross platform native mobile apps
The Unlicense
157 stars 29 forks source link

fable 2.x #64

Open forki opened 5 years ago

forki commented 5 years ago

I'm trying to update to fable 2.x but this üproject doesn't use webpack - so I can't copy @MangelMaxime's and @alfonsogarciacaro's work from https://github.com/SAFE-Stack/SAFE-BookStore/pull/378

any help appreciated

MangelMaxime commented 5 years ago

I think you first need to update fable-react-native for Fable 2 supports.

MangelMaxime commented 5 years ago

@forki fable-splitter is compatible with Fable 2 so I don't think you need to change it as we did for the webpack config when switching from Fable 1 to Fable 2.

For example, for a node cli apps this config is enough.

const path = require("path");

module.exports = {
    entry: path.join(__dirname, "./Docs.fsproj"),
    outDir: path.join(__dirname, "./dist"),
    babel: {
        plugins: ["@babel/plugin-transform-modules-commonjs"],
    }
};

As you can, see it's almost empty.

First, I would try to update all the npm packages to their latest version or at least thus related to Fable compilation. You will also need to add fable-compiler (related to Fable 2.1 release).

forki commented 5 years ago

do we continue to use dotnet-fable nuget package? Probably not, right?

forki commented 5 years ago

do I use some yarn command?

WIP at https://github.com/SAFE-Stack/SAFE-Nightwatch/pull/66

MangelMaxime commented 5 years ago

dotnet-fable has been removed since Fable 2.1

The replacement is to use fable-compiler from npm. To set up Fable 2.1:

forki commented 5 years ago

yes I have fable-compiler installed. but how to start it!?