mirror of https://github.com/harness/drone.git
Upgrade UICore to 4.1.2 to fix SplitButton slying + Fix CSS import orders (#1224)
parent
bcc1845f0f
commit
f24d5b06d3
|
@ -186,6 +186,92 @@ module.exports = {
|
|||
extensions: ['.mjs', '.js', '.ts', '.tsx', '.json', '.ttf', '.scss'],
|
||||
plugins: [new TsconfigPathsPlugin()]
|
||||
},
|
||||
optimization: {
|
||||
splitChunks: {
|
||||
minSize: 20_480,
|
||||
automaticNameDelimiter: '-',
|
||||
|
||||
cacheGroups: {
|
||||
common: {
|
||||
test: /[\\/]node_modules[\\/]/,
|
||||
priority: -5,
|
||||
reuseExistingChunk: true,
|
||||
chunks: 'initial',
|
||||
name: 'vendor-common',
|
||||
minSize: 20_480,
|
||||
maxSize: 512_000
|
||||
},
|
||||
|
||||
default: {
|
||||
minChunks: 2,
|
||||
priority: -10,
|
||||
reuseExistingChunk: true,
|
||||
minSize: 20_480,
|
||||
maxSize: 512_000
|
||||
},
|
||||
|
||||
// Opting out of defaultVendors, so rest of the node modules will be part of default cacheGroup
|
||||
defaultVendors: false,
|
||||
|
||||
react: {
|
||||
test: /[\\/]node_modules[\\/](react-dom)[\\/]/,
|
||||
name: 'vendor-react',
|
||||
chunks: 'all',
|
||||
priority: 50
|
||||
},
|
||||
|
||||
reactdom: {
|
||||
test: /[\\/]node_modules[\\/](react-dom)[\\/]/,
|
||||
name: 'vendor-react-dom',
|
||||
chunks: 'all',
|
||||
priority: 40
|
||||
},
|
||||
|
||||
reactrouterdom: {
|
||||
test: /[\\/]node_modules[\\/](react-router-dom)[\\/]/,
|
||||
name: 'vendor-react-router-dom',
|
||||
chunks: 'all',
|
||||
priority: 30,
|
||||
minSize: 0
|
||||
},
|
||||
|
||||
blueprintjs: {
|
||||
test: /[\\/]node_modules[\\/](@blueprintjs)[\\/]/,
|
||||
name: 'vendor-blueprintjs',
|
||||
chunks: 'all',
|
||||
priority: 20
|
||||
},
|
||||
|
||||
restfulreact: {
|
||||
test: /[\\/]node_modules[\\/](restful-react)[\\/]/,
|
||||
name: 'vendor-restful-react',
|
||||
chunks: 'all',
|
||||
priority: 10
|
||||
},
|
||||
|
||||
designsystem: {
|
||||
test: /[\\/]node_modules[\\/](@harnessio\/design-system)[\\/]/,
|
||||
name: 'vendor-harnessio-design-system',
|
||||
chunks: 'all',
|
||||
priority: 5
|
||||
},
|
||||
|
||||
icons: {
|
||||
test: /[\\/]node_modules[\\/](@harnessio\/icons)[\\/]/,
|
||||
name: 'vendor-harnessio-icons',
|
||||
chunks: 'all',
|
||||
priority: 1
|
||||
},
|
||||
|
||||
uicore: {
|
||||
test: /[\\/]node_modules[\\/](@harnessio\/uicore)[\\/]/,
|
||||
name: 'vendor-harnessio-uicore',
|
||||
chunks: 'all',
|
||||
priority: 1
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
plugins: [
|
||||
new MiniCssExtractPlugin({
|
||||
ignoreOrder: true,
|
||||
|
|
|
@ -36,6 +36,9 @@ const devConfig = {
|
|||
entry: path.resolve(CONTEXT, '/src/index.tsx'),
|
||||
devtool: 'cheap-module-source-map',
|
||||
cache: { type: 'filesystem' },
|
||||
output: {
|
||||
publicPath: '/'
|
||||
},
|
||||
devServer: {
|
||||
hot: true,
|
||||
host: HOST,
|
||||
|
|
|
@ -19,99 +19,11 @@ const commonConfig = require('./webpack.common')
|
|||
const CONTEXT = process.cwd()
|
||||
const path = require('path')
|
||||
|
||||
const groupsOptions = { chunks: 'all', minSize: 0, minChunks: 1, reuseExistingChunk: true, enforce: true }
|
||||
|
||||
const prodConfig = {
|
||||
context: CONTEXT,
|
||||
mode: 'production',
|
||||
entry: path.resolve(CONTEXT, '/src/index.tsx'),
|
||||
devtool: process.env.ENABLE_SOURCE_MAP ? 'source-map' : false,
|
||||
optimization: {
|
||||
splitChunks: {
|
||||
minSize: 20_480,
|
||||
automaticNameDelimiter: '-',
|
||||
|
||||
cacheGroups: {
|
||||
common: {
|
||||
test: /[\\/]node_modules[\\/]/,
|
||||
priority: -5,
|
||||
reuseExistingChunk: true,
|
||||
chunks: 'initial',
|
||||
name: 'vendor-common',
|
||||
minSize: 20_480,
|
||||
maxSize: 512_000
|
||||
},
|
||||
|
||||
default: {
|
||||
minChunks: 2,
|
||||
priority: -10,
|
||||
reuseExistingChunk: true,
|
||||
minSize: 20_480,
|
||||
maxSize: 512_000
|
||||
},
|
||||
|
||||
// Opting out of defaultVendors, so rest of the node modules will be part of default cacheGroup
|
||||
defaultVendors: false,
|
||||
|
||||
react: {
|
||||
test: /[\\/]node_modules[\\/](react-dom)[\\/]/,
|
||||
name: 'vendor-react',
|
||||
chunks: 'all',
|
||||
priority: 1
|
||||
},
|
||||
|
||||
reactdom: {
|
||||
test: /[\\/]node_modules[\\/](react-dom)[\\/]/,
|
||||
name: 'vendor-react-dom',
|
||||
chunks: 'all',
|
||||
priority: 1
|
||||
},
|
||||
|
||||
reactrouterdom: {
|
||||
test: /[\\/]node_modules[\\/](react-router-dom)[\\/]/,
|
||||
name: 'vendor-react-router-dom',
|
||||
chunks: 'all',
|
||||
priority: 1,
|
||||
minSize: 0
|
||||
},
|
||||
|
||||
blueprintjs: {
|
||||
test: /[\\/]node_modules[\\/](@blueprintjs)[\\/]/,
|
||||
name: 'vendor-blueprintjs',
|
||||
chunks: 'all',
|
||||
priority: 1
|
||||
},
|
||||
|
||||
restfulreact: {
|
||||
test: /[\\/]node_modules[\\/](restful-react)[\\/]/,
|
||||
name: 'vendor-restful-react',
|
||||
chunks: 'all',
|
||||
priority: 1
|
||||
},
|
||||
|
||||
designsystem: {
|
||||
test: /[\\/]node_modules[\\/](@harnessio\/design-system)[\\/]/,
|
||||
name: 'vendor-harnessio-design-system',
|
||||
chunks: 'all',
|
||||
priority: 1
|
||||
},
|
||||
|
||||
icons: {
|
||||
test: /[\\/]node_modules[\\/](@harnessio\/icons)[\\/]/,
|
||||
name: 'vendor-harnessio-icons',
|
||||
chunks: 'all',
|
||||
priority: 1
|
||||
},
|
||||
|
||||
uicore: {
|
||||
test: /[\\/]node_modules[\\/](@harnessio\/uicore)[\\/]/,
|
||||
name: 'vendor-harnessio-uicore',
|
||||
chunks: 'all',
|
||||
priority: 1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
devtool: process.env.ENABLE_SOURCE_MAP ? 'source-map' : false
|
||||
}
|
||||
|
||||
module.exports = merge(commonConfig, prodConfig)
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
"@codemirror/view": "^6.9.6",
|
||||
"@harnessio/design-system": "^2.1.1",
|
||||
"@harnessio/icons": "^2.1.0",
|
||||
"@harnessio/uicore": "^4.1.1",
|
||||
"@harnessio/uicore": "^4.1.2",
|
||||
"@types/dompurify": "^3.0.2",
|
||||
"@types/react-monaco-editor": "^0.16.0",
|
||||
"@uiw/codemirror-extensions-color": "^4.19.9",
|
||||
|
|
|
@ -1643,14 +1643,14 @@
|
|||
integrity sha512-ZwAGM1srOZ49/6YkwyjkczUv4v91CN0rCecRYnV3/g+xdSV5ycrUvkJjl9nHub6jw2eCGC0GdyNgAtAJnLmGfQ==
|
||||
|
||||
"@harnessio/icons@^2.1.0":
|
||||
version "2.1.0"
|
||||
resolved "https://registry.npmjs.org/@harnessio/icons/-/icons-2.1.0.tgz#9d93d5a4080e76d4f1b435ca2d28266d0ba936d0"
|
||||
integrity sha512-9DFu0v+Q0nx2HeJb7lWaWA6lnokSPcAKnjBDi87BWaY6SXbCn8Tk5wqWSnv/V2Xmn05iN89hjnuAjOhTuSpxXA==
|
||||
version "2.1.1"
|
||||
resolved "https://registry.npmjs.org/@harnessio/icons/-/icons-2.1.1.tgz#1cf4fb4ab5f83dd2389ab6669499dfd6ba8c6b7d"
|
||||
integrity sha512-arHZHsqKByvwey9h98HTXQBFrtY+zpTnbGHR5BNqfqg5bSbGJ0mX/2FA0kJpKjxNvywX3K8gqJtZIAyYxpIYyg==
|
||||
|
||||
"@harnessio/uicore@^4.1.1":
|
||||
version "4.1.1"
|
||||
resolved "https://registry.npmjs.org/@harnessio/uicore/-/uicore-4.1.1.tgz#958e7109489d7551fa3b6a01cbd2286479c61701"
|
||||
integrity sha512-uR88UW+ZN8n9yzxTnGp4bmmdR6eJacgsBfW5K3N7WQ3ISAmMB09842w2Y6sFiDUD8+RB4UqlOuBrjVUmrZroVg==
|
||||
"@harnessio/uicore@^4.1.2":
|
||||
version "4.1.2"
|
||||
resolved "https://registry.npmjs.org/@harnessio/uicore/-/uicore-4.1.2.tgz#731c8da3f53531b90f5b5cde4589b248129ef306"
|
||||
integrity sha512-xlV47pFpVd5LHBarMm18xgveUxoss5qpHhHAg8FKnfr6S+gy5OgfAsqWJAIiOCaUmwRbEvT/pAZeAQGh6fFUCA==
|
||||
|
||||
"@humanwhocodes/config-array@^0.5.0":
|
||||
version "0.5.0"
|
||||
|
|
Loading…
Reference in New Issue