Closed
requested to merge github/fork/Kyr/feature/modify-webpack-config-for-build-flat-dist into master
Created by: Kyr
Motivation.
For the some reasons I would to have ability to customize naming in /dist
. postbuild
script approach not very comfortable and needs an appropriate modification of manifestos.
This approach use optional naming schema configuration in consumer's package.json
, for example "flat" structure:
...
"distNaming": {
"output": {
"development": {
"filename": "bundle.js",
"chunkFilename": "[name].chunk.js"
},
"production": {
"filename": "[name].[contenthash:8].js",
"chunkFilename": "[name].[contenthash:8].chunk.js"
}
},
"media": {
"filename": "[name].[hash:8].[ext]"
},
"files": {
"filename": "[name].[hash:8].[ext]"
},
"css": {
"filename": "[name].[contenthash:8].css",
"chunkFilename": "[name].[contenthash:8].chunk.css"
}
}
...
Such config applied to default naming schema and then used in webpack's config factory.