jalaali / moment-jalaali

A Jalaali (Jalali, Persian, Khorshidi, Shamsi) calendar system plugin for moment.js.
MIT License
940 stars 162 forks source link

Vite.js configuration #224

Open hasanparasteh opened 3 years ago

hasanparasteh commented 3 years ago

Please consider adding the instruction of how can we use this project on Vite.js or either if you could make a Vite.js plugin that would be great.

themojilla commented 3 years ago

In order to make things also work for modern dev server/bundlers, moment-jalaali needs a hybrid build with both esm/cjs support as-well. I could contribute if it's OK. @alitaheri @behrang

behrang commented 3 years ago

I'm not familiar with recent trends in JS development. I would appreciate any contribution. Just note that moment.js itself is retiring and as a result, this library may not be that useful in the future.

hasanparasteh commented 3 years ago

After moment.js ends maintaining the project, I think we all should migrate to Luxon! Thanks for the great work you have done until now ❤️.

behrang commented 3 years ago

You're welcome. I'm happy that it has helped you, thanks to other members of the project.

miladganjali commented 7 months ago

if your app crash in run time try add this configuration to your vite.config.js

// ...
export default defineConfig({
  // ...
  resolve: {
    mainFields: [
      'browser',
      'module',
      'main',
      'jsnext:main',
      'jsnext'
    ]
  }
})