mirror of
https://github.com/Microsoft/vscode
synced 2024-08-26 12:29:37 +00:00
Update extensions/shared.webpack.config.js
This commit is contained in:
parent
cf64ef0884
commit
f9e6cc95e2
|
@ -15,6 +15,7 @@ const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||||
const { NLSBundlePlugin } = require('vscode-nls-dev/lib/webpack-bundler');
|
const { NLSBundlePlugin } = require('vscode-nls-dev/lib/webpack-bundler');
|
||||||
|
|
||||||
module.exports = function withDefaults(/**@type WebpackConfig*/extConfig) {
|
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 folderName = path.relative(__dirname, extConfig.context).split(/[\\\/]/)[0];
|
||||||
const pkgPath = path.join(__dirname, folderName, 'package.json');
|
const pkgPath = path.join(__dirname, folderName, 'package.json');
|
||||||
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
|
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
|
||||||
|
|
Loading…
Reference in a new issue