Skip to content

Commit

Permalink
[ksc-release-4.1] build: recover @ks-console/shared from extension ex…
Browse files Browse the repository at this point in the history
…ternals (kubesphere#4277)

* build: recover @ks-console/shared from extension externals

Signed-off-by: donniean <[email protected]>

* chore: rename

Signed-off-by: donniean <[email protected]>

---------

Signed-off-by: donniean <[email protected]>
Co-authored-by: donniean <[email protected]>
  • Loading branch information
ks-ci-bot and donniean authored Jul 15, 2024
1 parent 17ceb25 commit 9a4a387
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/bootstrap/webpack/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const config = {
};

const systemImports = {
// '@ks-console/shared': 'core:@kubed/@ks-console/shared',
'@ks-console/shared': 'core:@kubed/@ks-console/shared',
'@kubed/charts': 'core:@kubed/charts',
'@kubed/code-editor': 'core:@kubed/code-editor',
'@kubed/components': 'core:@kubed/components',
Expand Down
5 changes: 3 additions & 2 deletions packages/bootstrap/webpack/webpack.base.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ const getCustomTransformers = isDev ? () => ({ before: [styledComponentsTransfor

const { resolve, absResolve } = config;

const configFile = fs.pathExistsSync(resolve('configs/webpack.config.js'));
const configs = configFile ? require(resolve('configs/webpack.config.js')) : {};
const customConfigFilePath = resolve('configs/webpack.config.js');
const configFile = fs.pathExistsSync(customConfigFilePath);
const configs = configFile ? require(customConfigFilePath) : {};

const webpackBaseConfig = merge(configs, {
entry: {
Expand Down
7 changes: 4 additions & 3 deletions packages/bootstrap/webpack/webpack.extension.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ const { config } = require('./config');
const fs = require('fs-extra');
const resolve = config.resolve;

const configFile = fs.pathExistsSync(resolve('configs/webpack.config.js'));
const configs = configFile ? require(resolve('configs/webpack.config.js')) : {};
const customConfigFilePath = resolve('configs/webpack.extensions.config.js');
const configFile = fs.pathExistsSync(customConfigFilePath);
const configs = configFile ? require(customConfigFilePath) : {};

module.exports = merge(
{
Expand Down Expand Up @@ -105,7 +106,7 @@ module.exports = merge(
},
],
externals: [
// '@ks-console/shared',
'@ks-console/shared',
'@kubed/charts',
'@kubed/code-editor',
'@kubed/components',
Expand Down
2 changes: 1 addition & 1 deletion server/configs/systemImports.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const systemImports = {
// '@ks-console/shared': 'core:@kubed/@ks-console/shared',
'@ks-console/shared': 'core:@kubed/@ks-console/shared',
'@kubed/charts': 'core:@kubed/charts',
'@kubed/code-editor': 'core:@kubed/code-editor',
'@kubed/components': 'core:@kubed/components',
Expand Down

0 comments on commit 9a4a387

Please sign in to comment.