webpack - check js files, declare params, #56081

This commit is contained in:
Johannes Rieken
2018-08-21 16:39:52 +02:00
parent ac96d60418
commit a9e3a3d69e
5 changed files with 37 additions and 10 deletions

View File

@@ -3,12 +3,18 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
//@ts-check
/** @typedef {import('webpack').Configuration} WebpackConfig **/
'use strict';
const path = require('path');
const merge = require('merge-options');
module.exports = function withDefaults(extConfig) {
module.exports = function withDefaults(/**@type WebpackConfig*/extConfig) {
/** @type WebpackConfig */
let 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