vscode-azureresourcegroups/webpack.config.js

48 строки
1.9 KiB
JavaScript
Исходник Постоянная ссылка Обычный вид История

2020-02-06 00:38:34 +03:00
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
//@ts-check
// See https://github.com/Microsoft/vscode-azuretools/wiki/webpack for guidance
const process = require('process');
const dev = require("@microsoft/vscode-azext-dev");
2020-02-06 00:38:34 +03:00
let DEBUG_WEBPACK = !/^(false|0)?$/i.test(process.env.DEBUG_WEBPACK || '');
Migration work for vscode.dev (#611) * Megan/auth provider (#528) * Copy over first PR * Add changes from second PR * Add changes from third PR Co-authored-by: Megan Mott <meganmott@microsoft.com> * Webpack and VS Code Auth for WebExt (#542) * Refactor using v2 to incorporate auth * Temp * WIP * Fix build errors * Remove extra gulp commands * Use VS Code Auth provider when in web view * Remove crypto.randomUUID. It does not get polyfilled * Minor fixes * Fix publish workflow * rg api * Pull from main * Fix Open in Portal command (#551) * PR feedback --------- Co-authored-by: Alex Weininger <alex.weininger@live.com> Co-authored-by: Megan Mott <59709511+motm32@users.noreply.github.com> * Re-add account api * Working version of Resources * Fixes * Publish web bundle and package.json to a blob container for testing on vscode.dev (#566) * Add `Buffer` Node standard library to `webpack` bundle (#567) * Publish resources and package.nls.json for vscode.dev testing (#572) * Replace nanoid to uuid since it requires es2017 > (#576) * Fix create resource/create resource group (#579) * Upgrade azure package * Revert main.js file * Remove deadly 6 * Reset byteOffset when reading unitArray from VS Codes writeFile (#580) * Add title properties to tree views (#607) * Add title properties to treeViews * Mix merge conflicts in package.json * Remove extra description property * Add logic to listen to filter and status events changing for VS Code Auth Provider (#606) * Add logic to listen to filter and status events changing for VS Code Auth provider * Remove change in extension * Offline PR feedback for openUrl * Remove springapp from launch json * Fix up some build errors * Rename vscodeAuth commands to make more sense * Minor fixes * Refactor VS Code auth (#616) * Update names to match Azure Account API * Refactor VS Code auth * Fixups * Use utils 0.5.2-alpha.0 * Use Node 16 * Update lockfile * Fix lint errors * Fixup * Temporarily remove AA from extension deps * fixup 2 * Fixups * Update select subscriptions tree item command * Add back AA dep * Fix select subscriptions tree item command * PR feedback * Revert ext. depend. * Edit yaml to include package.json from the web folder * Edit yaml to include package.json from the web folder * Fix package-lock hopefully... npm ci works on my machine * Update VS Code types * Revert change to yaml. I definitely broke something * Unformat the yaml changes * Unformat the yaml changes * Add uuid typings because lint breaks on CI server * Remove pretest task * Add the pretest task back since its not really install azure accounts * Remove service linker experimental code * Remove the re-webpacking in preTest * Update dev package * Get rid of the pretest webpack --------- Co-authored-by: Megan Mott <meganmott@microsoft.com> Co-authored-by: Alex Weininger <alex.weininger@live.com> Co-authored-by: Megan Mott <59709511+motm32@users.noreply.github.com> Co-authored-by: Matthew Rayermann <marayerm@microsoft.com> Co-authored-by: Matthew Fisher <40250218+MicroFish91@users.noreply.github.com>
2023-03-25 00:45:30 +03:00
const config = dev.getDefaultWebpackConfig({
2020-02-06 00:38:34 +03:00
projectRoot: __dirname,
verbosity: DEBUG_WEBPACK ? 'debug' : 'normal',
entries: {
// required for cloud shell feature
cloudConsoleLauncher: './src/cloudConsole/cloudShellChildProcess/cloudConsoleLauncher.ts',
Migration work for vscode.dev (#611) * Megan/auth provider (#528) * Copy over first PR * Add changes from second PR * Add changes from third PR Co-authored-by: Megan Mott <meganmott@microsoft.com> * Webpack and VS Code Auth for WebExt (#542) * Refactor using v2 to incorporate auth * Temp * WIP * Fix build errors * Remove extra gulp commands * Use VS Code Auth provider when in web view * Remove crypto.randomUUID. It does not get polyfilled * Minor fixes * Fix publish workflow * rg api * Pull from main * Fix Open in Portal command (#551) * PR feedback --------- Co-authored-by: Alex Weininger <alex.weininger@live.com> Co-authored-by: Megan Mott <59709511+motm32@users.noreply.github.com> * Re-add account api * Working version of Resources * Fixes * Publish web bundle and package.json to a blob container for testing on vscode.dev (#566) * Add `Buffer` Node standard library to `webpack` bundle (#567) * Publish resources and package.nls.json for vscode.dev testing (#572) * Replace nanoid to uuid since it requires es2017 > (#576) * Fix create resource/create resource group (#579) * Upgrade azure package * Revert main.js file * Remove deadly 6 * Reset byteOffset when reading unitArray from VS Codes writeFile (#580) * Add title properties to tree views (#607) * Add title properties to treeViews * Mix merge conflicts in package.json * Remove extra description property * Add logic to listen to filter and status events changing for VS Code Auth Provider (#606) * Add logic to listen to filter and status events changing for VS Code Auth provider * Remove change in extension * Offline PR feedback for openUrl * Remove springapp from launch json * Fix up some build errors * Rename vscodeAuth commands to make more sense * Minor fixes * Refactor VS Code auth (#616) * Update names to match Azure Account API * Refactor VS Code auth * Fixups * Use utils 0.5.2-alpha.0 * Use Node 16 * Update lockfile * Fix lint errors * Fixup * Temporarily remove AA from extension deps * fixup 2 * Fixups * Update select subscriptions tree item command * Add back AA dep * Fix select subscriptions tree item command * PR feedback * Revert ext. depend. * Edit yaml to include package.json from the web folder * Edit yaml to include package.json from the web folder * Fix package-lock hopefully... npm ci works on my machine * Update VS Code types * Revert change to yaml. I definitely broke something * Unformat the yaml changes * Unformat the yaml changes * Add uuid typings because lint breaks on CI server * Remove pretest task * Add the pretest task back since its not really install azure accounts * Remove service linker experimental code * Remove the re-webpacking in preTest * Update dev package * Get rid of the pretest webpack --------- Co-authored-by: Megan Mott <meganmott@microsoft.com> Co-authored-by: Alex Weininger <alex.weininger@live.com> Co-authored-by: Megan Mott <59709511+motm32@users.noreply.github.com> Co-authored-by: Matthew Rayermann <marayerm@microsoft.com> Co-authored-by: Matthew Fisher <40250218+MicroFish91@users.noreply.github.com>
2023-03-25 00:45:30 +03:00
},
externals:
{
// Fix "Module not found" errors in ./node_modules/websocket/lib/{BufferUtil,Validation}.js
// These files are not in node_modules and so will fail normally at runtime and instead use fallbacks.
// Make them as external so webpack doesn't try to process them, and they'll simply fail at runtime as before.
'../build/Release/validation': 'commonjs ../build/Release/validation',
'../build/default/validation': 'commonjs ../build/default/validation',
'../build/Release/bufferutil': 'commonjs ../build/Release/bufferutil',
'../build/default/bufferutil': 'commonjs ../build/default/bufferutil',
// required for cloud shell feature
bufferutil: 'commonjs bufferutil',
'utf-8-validate': 'commonjs utf-8-validate',
'./platform/openbsd': 'commonjs copy-paste-openbsd',
Migration work for vscode.dev (#611) * Megan/auth provider (#528) * Copy over first PR * Add changes from second PR * Add changes from third PR Co-authored-by: Megan Mott <meganmott@microsoft.com> * Webpack and VS Code Auth for WebExt (#542) * Refactor using v2 to incorporate auth * Temp * WIP * Fix build errors * Remove extra gulp commands * Use VS Code Auth provider when in web view * Remove crypto.randomUUID. It does not get polyfilled * Minor fixes * Fix publish workflow * rg api * Pull from main * Fix Open in Portal command (#551) * PR feedback --------- Co-authored-by: Alex Weininger <alex.weininger@live.com> Co-authored-by: Megan Mott <59709511+motm32@users.noreply.github.com> * Re-add account api * Working version of Resources * Fixes * Publish web bundle and package.json to a blob container for testing on vscode.dev (#566) * Add `Buffer` Node standard library to `webpack` bundle (#567) * Publish resources and package.nls.json for vscode.dev testing (#572) * Replace nanoid to uuid since it requires es2017 > (#576) * Fix create resource/create resource group (#579) * Upgrade azure package * Revert main.js file * Remove deadly 6 * Reset byteOffset when reading unitArray from VS Codes writeFile (#580) * Add title properties to tree views (#607) * Add title properties to treeViews * Mix merge conflicts in package.json * Remove extra description property * Add logic to listen to filter and status events changing for VS Code Auth Provider (#606) * Add logic to listen to filter and status events changing for VS Code Auth provider * Remove change in extension * Offline PR feedback for openUrl * Remove springapp from launch json * Fix up some build errors * Rename vscodeAuth commands to make more sense * Minor fixes * Refactor VS Code auth (#616) * Update names to match Azure Account API * Refactor VS Code auth * Fixups * Use utils 0.5.2-alpha.0 * Use Node 16 * Update lockfile * Fix lint errors * Fixup * Temporarily remove AA from extension deps * fixup 2 * Fixups * Update select subscriptions tree item command * Add back AA dep * Fix select subscriptions tree item command * PR feedback * Revert ext. depend. * Edit yaml to include package.json from the web folder * Edit yaml to include package.json from the web folder * Fix package-lock hopefully... npm ci works on my machine * Update VS Code types * Revert change to yaml. I definitely broke something * Unformat the yaml changes * Unformat the yaml changes * Add uuid typings because lint breaks on CI server * Remove pretest task * Add the pretest task back since its not really install azure accounts * Remove service linker experimental code * Remove the re-webpacking in preTest * Update dev package * Get rid of the pretest webpack --------- Co-authored-by: Megan Mott <meganmott@microsoft.com> Co-authored-by: Alex Weininger <alex.weininger@live.com> Co-authored-by: Megan Mott <59709511+motm32@users.noreply.github.com> Co-authored-by: Matthew Rayermann <marayerm@microsoft.com> Co-authored-by: Matthew Fisher <40250218+MicroFish91@users.noreply.github.com>
2023-03-25 00:45:30 +03:00
},
target: 'node',
suppressCleanDistFolder: true,
2020-02-06 00:38:34 +03:00
});
if (DEBUG_WEBPACK) {
console.log('Config:', config);
}
module.exports = [config];