Update webpack, css/file & style loaders (#179008)

This commit is contained in:
Martin Aeschlimann
2023-04-03 16:10:40 +02:00
committed by GitHub
parent 1ee72c4854
commit 59608d3aee
6 changed files with 511 additions and 1641 deletions

View File

@@ -22,8 +22,7 @@ const tsLoaderOptions = {
onlyCompileBundledFiles: true,
};
function withNodeDefaults(/**@type WebpackConfig*/extConfig) {
/** @type WebpackConfig */
function withNodeDefaults(/**@type WebpackConfig & { context: string }*/extConfig) {
const defaultConfig = {
mode: 'none', // this leaves the source code as close as possible to the original (when packaging we set this to 'production')
target: 'node', // extensions run in a node context
@@ -105,7 +104,7 @@ function nodePlugins(context) {
* }} AdditionalBrowserConfig
*/
function withBrowserDefaults(/**@type WebpackConfig*/extConfig, /** @type AdditionalBrowserConfig */ additionalOptions = {}) {
function withBrowserDefaults(/**@type WebpackConfig & { context: string }*/extConfig, /** @type AdditionalBrowserConfig */ additionalOptions = {}) {
/** @type WebpackConfig */
const defaultConfig = {
mode: 'none', // this leaves the source code as close as possible to the original (when packaging we set this to 'production')