Skip to content

Commit

Permalink
Move ds web pack scripts into build/webpack folder (#9369)
Browse files Browse the repository at this point in the history
* Part of #9055
* Move webpack scripts into one place
* More fixes
* Fix scripts
  • Loading branch information
DonJayamanne authored Jan 3, 2020
1 parent 4a430ff commit 0911d4d
Show file tree
Hide file tree
Showing 5 changed files with 409 additions and 410 deletions.
7 changes: 3 additions & 4 deletions webpack.config.js → build/webpack/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

const merge = require('webpack-merge');
const datascience = require('./webpack.datascience-ui.config.js');
const extensionDependencies = require('./build/webpack/webpack.extension.dependencies.config.js').default;
const extensionDependencies = require('./webpack.extension.dependencies.config.js').default;

const configurations = [
// history-react
Expand All @@ -26,18 +26,17 @@ const configurations = [
}),
merge(extensionDependencies, {
mode: 'production',
devtool: 'source-map',
devtool: 'source-map'
})
];

// Dirty temporary hack.
// If the environment variable BUNDLE_INDEX is defined, then return just one item in the array.
// Refer issue for further details (https://github.com/microsoft/vscode-python/issues/9055)
if (process.env.BUNDLE_INDEX){
if (process.env.BUNDLE_INDEX) {
console.info(`Using Optimized Build, Bundle Index ${process.env.BUNDLE_INDEX}`);
module.exports = [configurations[parseInt(process.env.BUNDLE_INDEX, 10)]];
} else {
console.info('Not using Optimized Build');
module.exports = configurations;
}

Loading

0 comments on commit 0911d4d

Please sign in to comment.