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

Replace webpack with modd (2nd try) #58

Closed
wants to merge 3 commits into from
Closed

Conversation

ThomasWeiser
Copy link
Contributor

Continuing from #33

Reopening this PR, as devd version 0.7 now supports SPA routes.

This way we can cut the whole bloated Node.js/npm machinery.

Webpack is currently only used for automatically compiling the elm sources and reloading in the browser.

The tools modd/devd do the same with much less boilerplate. No need to have the npm machinery.

https://github.com/cortesi/modd
https://github.com/cortesi/devd

Current version v0.6 of devd doesn't support serving SPAs with non-hash-routes.
See this related issue: cortesi/devd#38

Since we don't want to use hash-routes, we will not use this modd/devd setup as long as devd doesn't support them.
Copy link
Collaborator

@oliverbarnes oliverbarnes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thomas, can you point to some reference where the community shows adoption of modd and devd? I couldn't find much just by googling. I worry new developers to the project will be used to webpack or another lib, and be turned off tooling that's not what most elm devs use. We have to weigh personal ease of use with general community adoption

@ThomasWeiser
Copy link
Contributor Author

You are right, the webpack configuration works right now and may be easier to kick off because most frontend devs will have installed node and npm anyway. So, let's postpone the question of the best build system to a later time.

As a workaround for the poor formatting of compiler messages there is already a supplemental modd.conf file, so that modd can be run alongside webpack just for the compiler messages.

For future reference let me sketch my reflections on that topic so far:

What I don't like about webpack is...

  • It pulls in a lot of files (currently 46M in 6661 files).
  • It's hard to configure.
  • It's hard to tweak for colorful compiler messages.
  • At least for development builds we don't need any of it's module bundling functionality. All we need here is: call the Elm compiler, copy some files, simple http serving with live reload.

On the contrary, a production build process may profit from webpack's abilities.

Alternatives (for development builds):

  • modd & devd as discussed in this PR and in Replace webpack with modd #33
  • elm reactor (not sure if it works currently with out project)
  • tomekwi/elm-live
  • Probably other npm based solutions
  • Tell people how to invoke elm compile and let them choose a dev server on their own.

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

Successfully merging this pull request may close these issues.

2 participants