-
Notifications
You must be signed in to change notification settings - Fork 107
Support webpack 4 only #53
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
BREAKING CHANGE: Drop support for Webpack version < 4
@owais I have tested my work, what do you think about this changes ? |
Thanks. Code looks good. Does this change the output format of the stats file in any way? Can you describe that in case. Since we are dropping support, this is a nice opportunity to make any changes to the stats file schema so more use cases can be accommodated. Generally I'd like to us to take a direction to make the stats file less specific to webpack. It should just contains references to assets that a webserver can later retrieve. If we are able to do that, we can then further protect non-JS web servers from the constant change in JS land but this needs further discussion and probably in a different place. |
The output format change a little but no breaking change. For exemple with full options, for two app we have : {
"status": "done",
"publicPath": "http://localhost:3000/assets/",
"startTime": 1578131712,
"endTime": 1578131912,
"chunks": {
"app1": [
{
"name": "vendors-zeazeazae62165416.js",
"publicPath": "http://localhost:3000/assets/js/vendors-zeazeazae62165416.js",
"path": "http://localhost:3000/assets/js/vendors-zeazeazae62165416.js",
"integrity": "sha256-SHA256 sha384-SHA384 sha512-SHA512"
},
{
"name": "commons-gfhrtyhrh45665.js",
"publicPath": "http://localhost:3000/assets/js/commons-gfhrtyhrh45665.js",
"path": "http://localhost:3000/assets/js/commons-gfhrtyhrh45665.js",
"integrity": "sha256-SHA256 sha384-SHA384 sha512-SHA512"
},
{
"name": "app1-tyujtyjgh6546879.css",
"publicPath": "http://localhost:3000/assets/js/app1-tyujtyjgh6546879.css",
"path": "http://localhost:3000/assets/js/app1-tyujtyjgh6546879.css",
"integrity": "sha256-SHA256 sha384-SHA384 sha512-SHA512"
},
{
"name": "app1-zeazeazae62165416.js",
"publicPath": "http://localhost:3000/assets/js/app1-zeazeazae62165416.js",
"path": "http://localhost:3000/assets/js/app1-zeazeazae62165416.js",
"integrity": "sha256-SHA256 sha384-SHA384 sha512-SHA512"
}
],
"app2": [
{
"name": "vendors-zeazeazae62165416.js",
"publicPath": "http://localhost:3000/assets/js/vendors-zeazeazae62165416.js",
"path": "http://localhost:3000/assets/js/vendors-zeazeazae62165416.js",
"integrity": "sha256-SHA256 sha384-SHA384 sha512-SHA512"
},
{
"name": "commons-gfhrtyhrh45665.js",
"publicPath": "http://localhost:3000/assets/js/commons-gfhrtyhrh45665.js",
"path": "http://localhost:3000/assets/js/commons-gfhrtyhrh45665.js",
"integrity": "sha256-SHA256 sha384-SHA384 sha512-SHA512"
},
{
"name": "app2-erzterte46544.css",
"publicPath": "http://localhost:3000/assets/js/app2-erzterte46544.css",
"path": "http://localhost:3000/assets/js/app2-erzterte46544.css",
"integrity": "sha256-SHA256 sha384-SHA384 sha512-SHA512"
},
{
"name": "app2-dfgdfgs54645.js",
"publicPath": "http://localhost:3000/assets/js/app2-dfgdfgs54645.js",
"path": "http://localhost:3000/assets/js/app2-dfgdfgs54645.js",
"integrity": "sha256-SHA256 sha384-SHA384 sha512-SHA512"
}
]
}
}
} It will show only entrypoint chunkGroup, not child chunk load on demand. |
Should path a be file-system path instead of a URL? |
Yes it was a mistake when copy / paste. |
Sounds good. We'll also need to add test cases to django-webpack-loader for webpack4 to ensure nothing breaks there. |
Rewrite of plugin into es6 syntax.
Handle splitChunks options of Webpack 4.
BREAKING CHANGE: Drop support for Webpack version < 4
Related to #52