You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+22Lines changed: 22 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -111,6 +111,8 @@ The `STATS_FILE` parameter represents the output file produced by `webpack-bundl
111
111
112
112
-`LOADER_CLASS` is the fully qualified name of a python class as a string that holds the custom webpack loader. This is where behavior can be customized as to how the stats file is loaded. Examples include loading the stats file from a database, cache, external url, etc. For convenience, `webpack_loader.loaders.WebpackLoader` can be extended. The `load_assets` method is likely where custom behavior will be added. This should return the stats file as an object.
113
113
114
+
-`WEBPACK_CHUNK_URL_USE_PUBLIC_PATH` (Default: `True`) is a flag that enables using the webpack's [publicPath](https://webpack.js.org/guides/public-path/) config as the chunk URL. Setting this to false may be useful if you are using both publicPath and a S3Storage with a custom ___domain.
115
+
114
116
-`SKIP_COMMON_CHUNKS` is a flag which prevents already generated chunks from being included again in the same page. This should only happen if you use more than one entrypoint per Django template (multiple `render_bundle` calls). By enabling this, you can get the same default behavior of the [HtmlWebpackPlugin](https://webpack.js.org/plugins/html-webpack-plugin/). The same caveats apply as when using `skip_common_chunks` on `render_bundle`, see that section below for more details.
115
117
116
118
Here's a simple example of loading from an external url:
@@ -436,6 +438,26 @@ In order to use `django-webpack-loader>=1.0.0`, you must ensure that `webpack-bu
436
438
437
439
This is necessary because the formatting of `webpack-stats.json` that `webpack-bundle-tracker` outputs has changed starting at version `1.0.0-alpha.1`. Starting at `django-webpack-loader==1.0.0`, this is the only formatting accepted here, meaning that other versions of that package don't output compatible files anymore, thereby breaking compatibility with older `webpack-bundle-tracker` releases.
438
440
441
+
## Development
442
+
443
+
This project includes a Makefile that provides several useful commands for building, installing, and publishing the project.
444
+
445
+
### Available Commands
446
+
447
+
-`clean`: Removes generated files and directories.
448
+
-`build`: Cleans the project and builds the distribution packages.
449
+
-`test`: Run the tests.
450
+
-`install`: Installs the project's build dependencies. Will initialize a virtual environment if one does not exist.
451
+
-`publish`: Builds the distribution packages and publishes them to the specified repository.
452
+
-`register`: Registers the package on the specified repository.
453
+
454
+
To execute a command, run `make <command>` in the project's root directory.
455
+
456
+
### Virtual Environment Settings
457
+
458
+
-`ENV`: The name of the virtual environment. (Default: `venv`)
459
+
-`REPOSITORY`: The repository to publish the distribution packages to. (Default: `pypi`)
0 commit comments