Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vite.js configuration #224

Open
hasanparasteh opened this issue Aug 26, 2021 · 5 comments
Open

Vite.js configuration #224

hasanparasteh opened this issue Aug 26, 2021 · 5 comments

Comments

@hasanparasteh
Copy link

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
Copy link

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
Copy link
Member

behrang commented Sep 14, 2021

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
Copy link
Author

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
Copy link
Member

behrang commented Sep 14, 2021

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

@miladganjali
Copy link

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'
    ]
  }
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants