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

Webpack configuration for development & production #26

Closed
jonase opened this issue Feb 7, 2016 · 2 comments
Closed

Webpack configuration for development & production #26

jonase opened this issue Feb 7, 2016 · 2 comments

Comments

@jonase
Copy link
Contributor

jonase commented Feb 7, 2016

We're using webpack to support the front end development (jsx/sass compilation etc.) and it's working really well. In addition we support "Hot Module Replacement (HMR)" which is great for the front end dev experience.

In this issue we'll collect problems (& hopefully their solutions) in trying to keep using the same setup even as the rest of Akvo Dash evolves.

For example, we need to run the webpack-dev-server in order to support HMR which means that it is not enough to run only the Clojure backend server during front-end development. We also need to make sure that we have a straight forward production build that puts the static assets built by webpack in all the right places so that (in production) the clojure server can serve them to the client.

@jonase
Copy link
Contributor Author

jonase commented Feb 7, 2016

@kardan we'll need to figure out how to configure the backend to serve index.html for all the different (and future) client side routes. One approach could be to explitly list them in :aliases in system.clj, something like

{:aliases  {"/" "/index.html"
            "/library/*" "/index.html" ;; perhaps :aliases doesn't support wildcards??
            "/dataset/*" "/index.html"
                ...}} 

This seems a bit gross so maybe there's a better way.

@iperdomo Or perhaps it's better to do this in nginx config?

@kardan
Copy link
Contributor

kardan commented Feb 7, 2016

(Mis)use catch all?

jonase added a commit that referenced this issue Feb 9, 2016
jonase added a commit that referenced this issue Feb 29, 2016
* bundle.js and other assets are set up to be served from the `/assets/` path
iperdomo added a commit that referenced this issue Mar 1, 2016
[#26] Make sure that the client production build works
@jonase jonase closed this as completed May 9, 2016
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

2 participants