enforce certain compile options

This commit is contained in:
Johannes Rieken
2018-08-16 10:55:49 +02:00
parent d62f5b3da9
commit a25b5cc805
2 changed files with 13 additions and 2 deletions

View File

@@ -3,6 +3,14 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
var __assign = (this && this.__assign) || Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var es = require("event-stream");
var assign = require("object-assign");
@@ -46,7 +54,7 @@ function fromLocal(extensionPath, sourceMappingURLBase) {
return data;
}))
.pipe(packageJsonFilter.restore);
var webpackConfig = require(path.join(extensionPath, 'extension.webpack.config.js'));
var webpackConfig = __assign({}, require(path.join(extensionPath, 'extension.webpack.config.js')), { mode: 'production', stats: 'errors-only' });
var webpackStream = webpackGulp(webpackConfig, webpack)
.pipe(es.through(function (data) {
data.stat = data.stat || {};

View File

@@ -52,7 +52,10 @@ export function fromLocal(extensionPath: string, sourceMappingURLBase?: string):
}))
.pipe(packageJsonFilter.restore);
const webpackConfig = require(path.join(extensionPath, 'extension.webpack.config.js'));
const webpackConfig = {
...require(path.join(extensionPath, 'extension.webpack.config.js')),
...{ mode: 'production', stats: 'errors-only' }
};
const webpackStream = webpackGulp(webpackConfig, webpack)
.pipe(es.through(function (data) {
data.stat = data.stat || {};