Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 11 additions & 22 deletions jbrowse/config/dev.config.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,14 @@
/*
* Copyright (c) 2019 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
const config = require('@labkey/build/configs/dev.config');
const { rspack } = require('@rspack/core');

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

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

const clientConfig = devConfig

// See: https://stackoverflow.com/questions/68707553/uncaught-referenceerror-buffer-is-not-defined
clientConfig.resolve.fallback =
{
"buffer": require.resolve("buffer")
}

clientConfig.plugins = [new NodePolyfillPlugin()].concat(constants.processPlugins(entryPoints))

clientConfig.output.publicPath = 'auto'

module.exports = [clientConfig]
module.exports = config;
35 changes: 7 additions & 28 deletions jbrowse/config/prod.config.js
Original file line number Diff line number Diff line change
@@ -1,30 +1,9 @@
/*
* Copyright (c) 2019 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
const config = require('@labkey/build/configs/prod.config');
const { rspack } = require('@rspack/core');

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

const entryPoints = require('../src/client/entryPoints');
const constants = require('../node_modules/@labkey/build/webpack/constants');
const NodePolyfillPlugin = require("node-polyfill-webpack-plugin")

const clientConfig = prodConfig

// See: https://stackoverflow.com/questions/68707553/uncaught-referenceerror-buffer-is-not-defined
clientConfig.resolve.fallback =
{
"buffer": require.resolve("buffer")
}

clientConfig.resolve.fallback =
{
"buffer": require.resolve("buffer")
}

clientConfig.plugins = [new NodePolyfillPlugin()].concat(constants.processPlugins(entryPoints))

clientConfig.output.publicPath = 'auto'

module.exports = [clientConfig]
module.exports = config;
28 changes: 6 additions & 22 deletions jbrowse/config/watch.config.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,8 @@
/*
* Copyright (c) 2019 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
const config = require('@labkey/build/configs/watch.config');
const { rspack } = require('@rspack/core');

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

const entryPoints = require('../src/client/entryPoints');
const constants = require('../node_modules/@labkey/build/webpack/constants');
const NodePolyfillPlugin = require("node-polyfill-webpack-plugin")

const clientConfig = watchConfig

clientConfig.resolve.fallback =
{
"buffer": require.resolve("buffer"),
}

clientConfig.plugins = [new NodePolyfillPlugin()].concat(constants.processPlugins(entryPoints))

clientConfig.output.publicPath = 'auto'

module.exports = [clientConfig]
module.exports = config;
Loading
Loading