Skip to content

Commit

Permalink
Version 3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
fjsj committed Dec 19, 2023
1 parent 6a07b23 commit 76d8d80
Show file tree
Hide file tree
Showing 21 changed files with 218 additions and 194 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ workflows:
matrix:
parameters:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
django-version: ["3.2", "4.0", "4.1", "4.2"]
django-version: ["3.2", "4.0", "4.1", "4.2", "5.0"]
exclude:
- python-version: "3.11"
django-version: "3.2"
Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:

coverall:
docker:
- image: cimg/python:3.11-node
- image: cimg/python:3.12-node
steps:
- run:
name: Finish Coveralls
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ For more general information, view the [readme](README.md).
Releases are added to the
[github release page](https://github.com/ezhome/django-webpack-loader/releases).

## [3.0.0] -- 2023-12-19

- Fix support for `publicPath: auto` in Webpack config, check updated examples at https://github.com/django-webpack/django-webpack-loader/tree/master/examples
- Add support for Python 3.12
- Add support for Django 5.0

## [2.0.1] -- 2023-06-14
- Add support for Django 4.2

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2015 Owais Lone
Copyright (c) 2023 Vinta Software

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ module.exports = {
entry: "./assets/js/index",
output: {
path: path.resolve(__dirname, "assets/webpack_bundles/"),
publicPath: "auto", // necessary for CDNs/S3/blob storages
filename: "[name]-[contenthash].js",
},
plugins: [
Expand Down Expand Up @@ -178,6 +179,7 @@ module.exports = {
output: {
// Emit bundle files at "assets/webpack_bundles/":
path: path.resolve(__dirname, "assets/webpack_bundles/"),
publicPath: "auto", // necessary for CDNs/S3/blob storages
filename: "[name]-[contenthash].js",
},
plugins: [
Expand Down Expand Up @@ -227,11 +229,11 @@ However, production usage for this package is **fairly flexible**, as the entire

### Hot reload

[Hot reload (Hot Module Replacement)](https://webpack.js.org/guides/hot-module-replacement/) is critical for a improving the development workflow. In case you wish to enable for your project, please check out [this example](https://github.com/django-webpack/django-webpack-loader/tree/master/examples/hot-reload), in particular how [webpack.config.js](https://github.com/django-webpack/django-webpack-loader/blob/master/examples/hot-reload/webpack.config.js) is configured. The key is to set the `devServer`.
[Hot reload (Hot Module Replacement)](https://webpack.js.org/guides/hot-module-replacement/) is critical for a improving the development workflow. In case you wish to enable for your project, please check out [this example](https://github.com/django-webpack/django-webpack-loader/tree/master/examples/hot-reload), in particular how [webpack.config.js](https://github.com/django-webpack/django-webpack-loader/blob/master/examples/hot-reload/webpack.config.js) is configured. The key is to set the `publicPath` and `devServer`.

### Dynamic Imports

In case you wish to use [Dynamic Imports](https://webpack.js.org/guides/code-splitting/#dynamic-imports), please check out [this example](https://github.com/django-webpack/django-webpack-loader/tree/master/examples/dynamic-imports), in particular how [webpack.config.js](https://github.com/django-webpack/django-webpack-loader/blob/master/examples/dynamic-imports/webpack.config.js) is configured. The key is to set the `publicPath`.
In case you wish to use [Dynamic Imports](https://webpack.js.org/guides/code-splitting/#dynamic-imports), please check out [this example](https://github.com/django-webpack/django-webpack-loader/tree/master/examples/dynamic-imports), in particular how [webpack.config.js](https://github.com/django-webpack/django-webpack-loader/blob/master/examples/dynamic-imports/webpack.config.js) is configured.

### Extra options for `webpack-bundle-tracker`

Expand Down Expand Up @@ -469,8 +471,12 @@ To execute a command, run `make <command>` in the project's root directory.
- `ENV`: The name of the virtual environment. (Default: `venv`)
- `REPOSITORY`: The repository to publish the distribution packages to. (Default: `pypi`)

### Special Thanks

Django Webpack Loader was originally created by [Owais Lone](https://github.com/owais) and received contributions from more than 50 developers since its inception, as well as many others who assisted with issues, comments, articles, talks, etc. Thanks for everyone who's been part of Django Webpack Loader community!

## Commercial Support

[![alt text](https://avatars2.githubusercontent.com/u/5529080?s=80&v=4 "Vinta Logo")](https://www.vinta.com.br/)

This project is maintained by [Vinta Software](https://www.vinta.com.br/) and is used in products of Vinta's clients. We are always looking for exciting work, so if you need any commercial support, feel free to get in touch: contact@vinta.com.br
This project is currently maintained by [Vinta Software](https://www.vinta.com.br/) and is used in products of Vinta's clients. We are always looking for exciting work, so if you need any commercial support, feel free to get in touch: contact@vinta.com.br
80 changes: 40 additions & 40 deletions examples/code-splitting/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions examples/code-splitting/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.0",
"description": "",
"main": "index.js",
"author": "Owais Lone",
"author": "Vinta Software",
"license": "MIT",
"devDependencies": {
"@babel/core": "^7.22.20",
Expand All @@ -13,7 +13,7 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"webpack": "^5.88.2",
"webpack-bundle-tracker": "2.0.1",
"webpack-bundle-tracker": "3.0.0",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^4.15.1"
}
Expand Down
1 change: 1 addition & 0 deletions examples/code-splitting/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module.exports = {
},
output: {
path: path.resolve(__dirname, "assets/webpack_bundles/"),
publicPath: "auto",
filename: "[name]-[contenthash].js",
},

Expand Down
8 changes: 4 additions & 4 deletions examples/dynamic-imports/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions examples/dynamic-imports/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.0",
"description": "",
"main": "index.js",
"author": "Owais Lone",
"author": "Vinta Software",
"license": "MIT",
"devDependencies": {
"@babel/core": "^7.22.20",
Expand All @@ -13,7 +13,7 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"webpack": "^5.88.2",
"webpack-bundle-tracker": "2.0.1",
"webpack-bundle-tracker": "3.0.0",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^4.15.1"
},
Expand Down
2 changes: 1 addition & 1 deletion examples/dynamic-imports/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = {
// our chunk generated by the dynamic import from "/" instead of "/static/".
// Remember to also add `os.path.join(BASE_DIR, "assets", "webpack_bundles")` to
// STATICFILES_DIRS in Django settings:
publicPath: "/static/webpack_bundles/",
publicPath: "auto", // or "/static/webpack_bundles/",
filename: "[name]-[contenthash].js",
},

Expand Down
Loading

0 comments on commit 76d8d80

Please sign in to comment.