mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-13 11:38:36 -05:00
Merge from vscode 8e0f348413f4f616c23a88ae30030efa85811973 (#6381)
* Merge from vscode 8e0f348413f4f616c23a88ae30030efa85811973 * disable strict null check
This commit is contained in:
@@ -9,11 +9,17 @@
|
||||
'use strict';
|
||||
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
const merge = require('merge-options');
|
||||
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||
|
||||
const { NLSBundlePlugin } = require('vscode-nls-dev/lib/webpack-bundler');
|
||||
|
||||
module.exports = function withDefaults(/**@type WebpackConfig*/extConfig) {
|
||||
// Need to find the top-most `package.json` file
|
||||
const folderName = path.relative(__dirname, extConfig.context).split(/[\\\/]/)[0];
|
||||
const pkgPath = path.join(__dirname, folderName, 'package.json');
|
||||
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
|
||||
const id = `${pkg.publisher}.${pkg.name}`;
|
||||
|
||||
/** @type WebpackConfig */
|
||||
let defaultConfig = {
|
||||
@@ -64,9 +70,11 @@ module.exports = function withDefaults(/**@type WebpackConfig*/extConfig) {
|
||||
// yes, really source maps
|
||||
devtool: 'source-map',
|
||||
plugins: [
|
||||
// @ts-ignore
|
||||
new CopyWebpackPlugin([
|
||||
{ from: './out/**/*', to: '.', ignore: ['*.js', '*.js.map'], flatten: true }
|
||||
])
|
||||
{ from: 'src', to: '.', ignore: ['**/test/**', '*.ts'] }
|
||||
]),
|
||||
new NLSBundlePlugin(id)
|
||||
],
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user