flat icon indicating copy to clipboard operation
flat copied to clipboard

[chore]: unified build tool to vite

Open BlackHole1 opened this issue 4 years ago • 1 comments

The current flat sub-project uses a different build tool:

  • [x] #1300
    • webpack assign to @Cyberhan123
  • [x] #1173
    • webpack assign to @Cyberhan123
  • [x] web/flat-web
    • vite (esbuild + rollup)
  • [x] #1143
    • webpack (storybook built-in) assign to @Cyberhan123
  • [x] #1131
    • tsc assign to @Cyberhan123

we always knew it was confusing, but the good news is that we will remain unified in the future and will all switch to vite.

before switching to vite, we need to wait for the storybook to support vite builds

The storybook is still being optimized and there are still some issues with storybook-builder-vite(see: https://github.com/eirslett/storybook-builder-vite/issues/2).

When they are finished, they will be ready for migration

other sub-projects can be migrated in one step first

BlackHole1 avatar Sep 29 '21 03:09 BlackHole1

So far so good, the last thing preventing us to close this issue is storybook 7 (still in beta), which is meant to get rid of webpack completely.

The storybook library currently has been locked to some version to prevent react-router-dom version conflicting (5 vs 6) with the existing one in this repo. So the upgrading may not be easy.

Another annoying thing is we cannot turn off packages hoisting in https://github.com/netless-io/flat/blob/main/.npmrc#L2 because electron-builder does not support evaluating symlinks in file system (which is created by pnpm). Maybe @BlackHole1 could look into this in some day.

hyrious avatar Jan 06 '23 09:01 hyrious