Skip to content

Commit 03848c2

Browse files
committed
chore: edit build
1 parent 7707651 commit 03848c2

File tree

4 files changed

+25
-22
lines changed

4 files changed

+25
-22
lines changed

.github/workflows/deploy-to-gh-pages.yml

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ env:
2525
BUILD_SCRIPT: yarn stand:build
2626
BUILD_SCRIPT_OUTPUT: build
2727
APP_NAME: portal
28+
BROWSER_HASH: true
2829

2930
jobs:
3031
# Single deploy job since we're just deploying

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@
193193
"@consta/charts": "^1.0.0",
194194
"@consta/header": "^3.0.0",
195195
"@consta/icons": "^1.1.0",
196-
"@consta/stand": "^0.0.150",
196+
"@consta/stand": "^0.0.154",
197197
"@consta/uikit": "^5.0.0",
198198
"@consta/widgets-utils": "^0.2.15",
199199
"@evless/react-textfit": "1.1.1",

webpack.config.js

+18-9
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ module.exports = function () {
224224
],
225225
type: 'asset/resource',
226226
generator: {
227-
filename: 'static/[name]__[hash:8][ext]',
227+
filename: 'asset-[name]__[hash:8][ext]',
228228
},
229229
},
230230
{
@@ -325,6 +325,13 @@ module.exports = function () {
325325
},
326326

327327
plugins: [
328+
new webpack.DefinePlugin({
329+
'process.env.NODE_ENV': JSON.stringify(
330+
process.env.NODE_ENV || 'development',
331+
),
332+
'process.env.BROWSER_HASH': JSON.stringify(process.env.BROWSER_HASH),
333+
}),
334+
328335
new HtmlWebpackPlugin({
329336
template: path.resolve(__dirname, 'public', 'index.html'),
330337
...(isEnvProduction
@@ -351,26 +358,28 @@ module.exports = function () {
351358
new webpack.ProgressPlugin(),
352359

353360
new MiniCssExtractPlugin({
354-
filename: 'static/[contenthash].css',
355-
chunkFilename: 'static/[contenthash].css',
361+
filename: 'main-[contenthash].css',
362+
chunkFilename: 'chunk-[contenthash].css',
356363
ignoreOrder: true,
357364
}),
358365

359366
new CssMinimizerPlugin(),
360367

361-
new FaviconsWebpackPlugin(
362-
path.resolve(__dirname, 'public', 'favicon.svg'),
363-
),
368+
new FaviconsWebpackPlugin({
369+
logo: path.resolve(__dirname, 'public', 'favicon.svg'),
370+
publicPath: '/',
371+
prefix: '',
372+
}),
364373
].filter(Boolean),
365374

366375
output: {
367376
filename: 'index.js',
368377
path: path.resolve(__dirname, 'build'),
369378
...(isEnvProduction && {
370379
asyncChunks: true,
371-
filename: 'static/[contenthash].js',
372-
chunkFilename: 'static/[contenthash].js',
373-
assetModuleFilename: 'static/media/[contenthash][ext]',
380+
filename: 'main-[contenthash].js',
381+
chunkFilename: 'chunk-[contenthash].js',
382+
assetModuleFilename: 'asset-[contenthash][ext]',
374383
}),
375384
publicPath: '/',
376385
},

yarn.lock

+5-12
Original file line numberDiff line numberDiff line change
@@ -13128,7 +13128,7 @@ resolve.exports@^1.1.0:
1312813128
resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-1.1.0.tgz#5ce842b94b05146c0e03076985d1d0e7e48c90c9"
1312913129
integrity sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ==
1313013130

13131-
resolve@>=1.9.0, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.13.1, resolve@^1.14.2, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.22.0, resolve@^1.22.1, resolve@^1.9.0:
13131+
resolve@^1.1.7, resolve@^1.10.0, resolve@^1.13.1, resolve@^1.14.2, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.22.0, resolve@^1.22.1, resolve@^1.9.0:
1313213132
version "1.22.1"
1313313133
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177"
1313413134
integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==
@@ -14806,13 +14806,6 @@ tsutils@^3.21.0:
1480614806
dependencies:
1480714807
tslib "^1.8.1"
1480814808

14809-
ttypescript@^1.5.15:
14810-
version "1.5.15"
14811-
resolved "https://registry.yarnpkg.com/ttypescript/-/ttypescript-1.5.15.tgz#e45550ad69289d06d3bc3fd4a3c87e7c1ef3eba7"
14812-
integrity sha512-48ykDNHzFnPMnv4hYX1P8Q84TvCZyL1QlFxeuxsuZ48X2+ameBgPenvmCkHJtoOSxpoWTWi8NcgNrRnVDOmfSg==
14813-
dependencies:
14814-
resolve ">=1.9.0"
14815-
1481614809
tunnel-agent@^0.6.0:
1481714810
version "0.6.0"
1481814811
resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd"
@@ -14908,10 +14901,10 @@ typescript@^4.6.4:
1490814901
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235"
1490914902
integrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==
1491014903

14911-
typescript@^5.4.5:
14912-
version "5.5.4"
14913-
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.5.4.tgz#d9852d6c82bad2d2eda4fd74a5762a8f5909e9ba"
14914-
integrity sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==
14904+
typescript@^5.8.3:
14905+
version "5.8.3"
14906+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.8.3.tgz#92f8a3e5e3cf497356f4178c34cd65a7f5e8440e"
14907+
integrity sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==
1491514908

1491614909
1491714910
version "0.0.6"

0 commit comments

Comments
 (0)