Skip to content

Commit

Permalink
Merge branch 'dev-4.2.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
HSunboy committed Dec 27, 2023
2 parents 5fe452b + a6acfbe commit b4b092b
Show file tree
Hide file tree
Showing 371 changed files with 12,648 additions and 9,254 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/bundleSize.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Compressed Size

on: [pull_request]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: preactjs/compressed-size-action@v2
with:
build-script: "build:odc"
pattern: "./dist/renderer/*.{js,css,html}"
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ src/plugins/udp
src/plugins/pluginList.ts
.env
config/config.odcPlugin.js
yarn-error.log
yarn-error.log
yarn.lock
47 changes: 1 addition & 46 deletions config/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,40 +19,24 @@ let publicPath = '/';
const define = defineConfig();

const config = {
// singular: true,
mock: false,
// dynamicImport: {
// loading: "@/component/Loading"
// },
// dynamicImportSyntax: {},
publicPath,
esbuildMinifyIIFE: true,
runtimePublicPath: {},
hash: true,
esbuildMinifyIIFE: true,
// tracert: {
// spmAPos: 'a3112',
// bizType: 'lu',
// type: 'manual',
// ifInjectManualScript: false,
// ifRouterNeedPv: true
// },
targets: {
chrome: 76,
firefox: 60,
edge: 79,
},
// esbuild: {},
metas: [
{
name: 'version',
content: version,
},
],
// nodeModulesTransform: {
// type: 'none',
// exclude: [],
// },

antd: {
import: true,
},
Expand Down Expand Up @@ -86,37 +70,16 @@ const config = {
externals: {
electron: 'commonjs electron',
},
svgr: false,
svgo: false,
alias: {
"@@node_modules": path.resolve(process.cwd(), 'node_modules')
},
chainWebpack(config) {
config.performance.hints('warning');
config.module.rules.delete('svg');
config.module.rule('asset').oneOf('fallback').exclude.add(/.svg/);
config.plugin('monaco').use(MonacoWebpackPlugin, [
{
filename: '[name].worker.js',
languages: ['yaml', 'json']
}
])
config.module
.rule('svg')
.test(/\.svg(\?v=\d+\.\d+\.\d+)?$/)
.use([
{
loader: 'babel-loader',
},
{
loader: '@svgr/webpack',
options: {
babel: false,
icon: true,
},
},
])
.loader(require.resolve('@svgr/webpack'));
},

history: {
Expand All @@ -126,15 +89,7 @@ const config = {
outputPath: './dist/renderer',

define,

// qiankun: {
// slave: {},
// },

// 路由配置
routes: routes,
// ? undefined
// : routes
};
if (disableBrowserUpdate) {
delete config.browserUpdate;
Expand Down
1 change: 1 addition & 0 deletions config/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ module.exports = [
},
{
path: '/',
wrappers: ["@/layout/PageLoadingWrapper"],
component: '../layout/AppContainer',
routes: [
{ path: '/odc/gateway/*', redirect: '/gateway/*'},
Expand Down
10 changes: 10 additions & 0 deletions libraries/script/preload.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const { contextBridge, ipcRenderer } = require('electron');

contextBridge.exposeInMainWorld("ODCClient", {
ipcInvoke(method, ...args) {
return ipcRenderer.invoke(method, ...args)
.then((result) => {
return result;
});
}
})
Loading

0 comments on commit b4b092b

Please sign in to comment.