Skip to content

Enhancement/Integrate Webpack and Django#117

Merged
Hironsan merged 1 commit intodoccano:masterfrom
CatalystCode:enhancement/webpack-in-django
Mar 25, 2019
Merged

Enhancement/Integrate Webpack and Django#117
Hironsan merged 1 commit intodoccano:masterfrom
CatalystCode:enhancement/webpack-in-django

Conversation

@c-w
Copy link
Member

@c-w c-w commented Mar 22, 2019

This is a follow-up to #80.

This pull request more tightly integrates Django asset serving with the Webpack compiler. Specifically, after this change, it will no longer be required to manually compile the project's Javascript to integrate it with the Django server. Instead the Javascript will be compiled and reloaded on the fly automatically.

In a development scenario (here emulated by running the server as described in the README), the assets get linked via the hot reloading Webpack development server:

Screenshot showing development asset loading

This enables a number of enhancements to the developer experience, including not having to manually run the Webpack build and also being able to debug Javascript before it went through the build process:

Screenshot showing debugging of Javascript before compilation

In a production scenario (here emulated by running the server via Docker), the assets get directly linked from the compiled static bundles folder as before:

Screenshot showing production asset loading

@c-w c-w force-pushed the enhancement/webpack-in-django branch from 97b6426 to 07d5172 Compare March 22, 2019 13:50
@Hironsan Hironsan merged commit a3635cf into doccano:master Mar 25, 2019
@Hironsan
Copy link
Member

Thanks!

@c-w c-w deleted the enhancement/webpack-in-django branch March 25, 2019 12:26
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