Skip to content

Commit c4887d0

Browse files
bbimberSebastian Benjamin
andauthored
Upgrade to @labkey/build 10.x (#408)
* Upgrade to @labkey/build 10.x * Remove patch files, upgrade jbrowse+react, fix mui-related table issues * Add variant details popup test --------- Co-authored-by: Sebastian Benjamin <sebastiancbenjamin@gmail.com>
1 parent b198024 commit c4887d0

16 files changed

Lines changed: 2555 additions & 7636 deletions

File tree

jbrowse/config/dev.config.js

Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,14 @@
1-
/*
2-
* Copyright (c) 2019 LabKey Corporation
3-
*
4-
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
5-
*/
1+
const config = require('@labkey/build/configs/dev.config');
2+
const { rspack } = require('@rspack/core');
63

7-
const devConfig = require('../node_modules/@labkey/build/webpack/dev.config')
4+
config.output.publicPath = 'auto';
85

9-
const entryPoints = require('../src/client/entryPoints');
10-
const constants = require('../node_modules/@labkey/build/webpack/constants');
11-
const NodePolyfillPlugin = require("node-polyfill-webpack-plugin")
6+
// Bundle production React even in dev builds via nodeEnv. React 19's development
7+
// build allocates a stack-capturing Error per createElement, which makes large lists
8+
// (e.g. the VariantSearch sample multiselect) slow enough to fail Selenium tests.
9+
config.optimization = { ...config.optimization, nodeEnv: 'production' };
10+
config.plugins.push(new rspack.DefinePlugin({
11+
'process.env': JSON.stringify({ NODE_ENV: 'production' })
12+
}));
1213

13-
const clientConfig = devConfig
14-
15-
// See: https://stackoverflow.com/questions/68707553/uncaught-referenceerror-buffer-is-not-defined
16-
clientConfig.resolve.fallback =
17-
{
18-
"buffer": require.resolve("buffer")
19-
}
20-
21-
clientConfig.plugins = [new NodePolyfillPlugin()].concat(constants.processPlugins(entryPoints))
22-
23-
clientConfig.output.publicPath = 'auto'
24-
25-
module.exports = [clientConfig]
14+
module.exports = config;

jbrowse/config/prod.config.js

Lines changed: 7 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,9 @@
1-
/*
2-
* Copyright (c) 2019 LabKey Corporation
3-
*
4-
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
5-
*/
1+
const config = require('@labkey/build/configs/prod.config');
2+
const { rspack } = require('@rspack/core');
63

7-
const prodConfig = require('../node_modules/@labkey/build/webpack/prod.config')
4+
config.output.publicPath = 'auto';
5+
config.plugins.push(new rspack.DefinePlugin({
6+
'process.env': JSON.stringify({ NODE_ENV: 'production' })
7+
}));
88

9-
const entryPoints = require('../src/client/entryPoints');
10-
const constants = require('../node_modules/@labkey/build/webpack/constants');
11-
const NodePolyfillPlugin = require("node-polyfill-webpack-plugin")
12-
13-
const clientConfig = prodConfig
14-
15-
// See: https://stackoverflow.com/questions/68707553/uncaught-referenceerror-buffer-is-not-defined
16-
clientConfig.resolve.fallback =
17-
{
18-
"buffer": require.resolve("buffer")
19-
}
20-
21-
clientConfig.resolve.fallback =
22-
{
23-
"buffer": require.resolve("buffer")
24-
}
25-
26-
clientConfig.plugins = [new NodePolyfillPlugin()].concat(constants.processPlugins(entryPoints))
27-
28-
clientConfig.output.publicPath = 'auto'
29-
30-
module.exports = [clientConfig]
9+
module.exports = config;

jbrowse/config/watch.config.js

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,8 @@
1-
/*
2-
* Copyright (c) 2019 LabKey Corporation
3-
*
4-
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
5-
*/
1+
const config = require('@labkey/build/configs/watch.config');
2+
const { rspack } = require('@rspack/core');
63

7-
const watchConfig = require('../node_modules/@labkey/build/webpack/watch.config')
4+
config.plugins.push(new rspack.DefinePlugin({
5+
'process.env': JSON.stringify({ NODE_ENV: 'development' })
6+
}));
87

9-
const entryPoints = require('../src/client/entryPoints');
10-
const constants = require('../node_modules/@labkey/build/webpack/constants');
11-
const NodePolyfillPlugin = require("node-polyfill-webpack-plugin")
12-
13-
const clientConfig = watchConfig
14-
15-
clientConfig.resolve.fallback =
16-
{
17-
"buffer": require.resolve("buffer"),
18-
}
19-
20-
clientConfig.plugins = [new NodePolyfillPlugin()].concat(constants.processPlugins(entryPoints))
21-
22-
clientConfig.output.publicPath = 'auto'
23-
24-
module.exports = [clientConfig]
8+
module.exports = config;

0 commit comments

Comments
 (0)