Skip to content

Commit

Permalink
build: reduce webui generated file path
Browse files Browse the repository at this point in the history
  • Loading branch information
fengyc committed Dec 22, 2024
1 parent c0d2aeb commit 96e68ae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
7 changes: 1 addition & 6 deletions pisugar-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,10 @@ assets = [
"644",
],
[
"../pisugar-webui/dist/*",
"../pisugar-webui/dist/**/*",
"usr/share/pisugar-server/web/",
"644",
],
[
"../pisugar-webui/dist/static/**/*",
"usr/share/pisugar-server/web/static/",
"644",
],
]
conf-files = ["/etc/default/pisugar-server", "/etc/pisugar-server/config.json"]

Expand Down
6 changes: 3 additions & 3 deletions pisugar-webui/build/webpack.prod.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ const webpackConfig = merge(baseWebpackConfig, {
devtool: config.build.productionSourceMap ? config.build.devtool : false,
output: {
path: config.build.assetsRoot,
filename: utils.assetsPath('js/[name].[chunkhash].js'),
chunkFilename: utils.assetsPath('js/[id].[chunkhash].js')
filename: utils.assetsPath('js/[name].[chunkhash:6].js'),
chunkFilename: utils.assetsPath('js/[id].[chunkhash:6].js')
},
plugins: [
// http://vuejs.github.io/vue-loader/en/workflow/production.html
Expand All @@ -43,7 +43,7 @@ const webpackConfig = merge(baseWebpackConfig, {
}),
// extract css into its own file
new ExtractTextPlugin({
filename: utils.assetsPath('css/[name].[contenthash].css'),
filename: utils.assetsPath('css/[name].[contenthash:6].css'),
// Setting the following option to `false` will not extract CSS from codesplit chunks.
// Their CSS will instead be inserted dynamically with style-loader when the codesplit chunk has been loaded by webpack.
// It's currently set to `true` because we are seeing that sourcemaps are included in the codesplit bundle as well when it's `false`,
Expand Down

0 comments on commit 96e68ae

Please sign in to comment.