metarhia / BestPractice

Metarhia best practice for relative technologies
MIT License
64 stars 4 forks source link

ESbuild / Vite.js for build #6

Open cheatsnake opened 1 year ago

cheatsnake commented 1 year ago

ESbuild / Vite.js were not mentioned in the row about builders, although they are already often used (especially in new projects).

tshemsedinov commented 1 year ago

Мы пока не использовали, как доберемся до фронта на курсе по ноде, то сравним

VladyslavSpasibozhko commented 1 year ago

I agree with @cheatsnake. Vite much faster then Webpack and can be used with Vue, React. In new projects Vite is preferred way to build project instead of using Webpack.

letavocado commented 1 year ago

@cheatsnake, @VladyslavSpasibozhko

ESbuild can't top level await Vite.js used for frontend

Feel free to correct me. :smile:

Cheers!

Pakistanka commented 9 months ago

@VladyslavSpasibozhko Подскажите, в итоге удалось как-то vite и lucid сконфигурировать? Я не могу решить top-level ошибку и еще несколько

letavocado commented 9 months ago

@Pakistanka top-level await в vite https://github.com/mozilla/pdf.js/issues/17245#issuecomment-1812360307

{
  build: {
    target: "es2022"
  },
  esbuild: {
    target: "es2022"
  },
  optimizeDeps:{
    esbuildOptions: {
      target: "es2022",
    }
  }
}