From b960bc9ff95cbded20731e6ecfd68c0664aee606 Mon Sep 17 00:00:00 2001 From: undefined Date: Thu, 2 Sep 2021 20:24:34 +0800 Subject: [PATCH] ui: resource package --- packages/ui-default/build/config/webpack.js | 18 ++++++++++++++---- packages/ui-default/package.json | 2 +- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/packages/ui-default/build/config/webpack.js b/packages/ui-default/build/config/webpack.js index 1eac5ad5b..6114ed85d 100644 --- a/packages/ui-default/build/config/webpack.js +++ b/packages/ui-default/build/config/webpack.js @@ -88,7 +88,7 @@ export default function (env = {}) { hashDigest: 'hex', hashDigestLength: 10, filename: '[name].js?[hash]', - chunkFilename: '[name].chunk.js?[hash]', + chunkFilename: '[name].[chunkhash].chunk.js', }, resolve: { modules: [root('node_modules'), root('../../node_modules')], @@ -139,12 +139,22 @@ export default function (env = {}) { monaco: { test: /[\\/]monaco-editor[\\/]/, priority: 9, - name: `monaco-${require('monaco-editor/package.json').version}`, + name: 'monaco', }, vditor: { test: /[\\/]vditor[\\/]/, priority: 8, - name: `vditor-${require('vditor/package.json').version}`, + name: 'vditor', + }, + echarts: { + test: /[\\/]echarts[\\/]/, + priority: 7, + name: 'echarts', + }, + graphql: { + test: /[\\/](graphiql|codemirror)[\\/]/, + priority: 6, + name: 'gql-cm', }, vendors: { test: /[\\/]node_modules[\\/].+\.([jt]sx?|json|yaml)$/, @@ -214,7 +224,7 @@ export default function (env = {}) { new webpack.LoaderOptionsPlugin({ options: { context: root(), - customInterpolateName: (url) => beautifyOutputUrl(url), + customInterpolateName: beautifyOutputUrl, }, }), new MonacoWebpackPlugin({ diff --git a/packages/ui-default/package.json b/packages/ui-default/package.json index d2bea541b..25e861f6a 100644 --- a/packages/ui-default/package.json +++ b/packages/ui-default/package.json @@ -1,6 +1,6 @@ { "name": "@hydrooj/ui-default", - "version": "4.19.0", + "version": "4.19.1", "author": "undefined ", "license": "AGPL-3.0", "main": "hydro.js",