chore: fix declarations emit

This commit is contained in:
Roman Hotsiy 2018-05-17 11:40:47 +03:00
parent 135651a8a6
commit f7bf0b8912
No known key found for this signature in database
GPG Key ID: 5CB7B3ACABA57CB0
3 changed files with 14 additions and 5 deletions

View File

@ -8,7 +8,6 @@
"strictNullChecks": true,
"sourceMap": true,
"declaration": true,
"declarationDir": "typings",
"noEmitHelpers": true,
"importHelpers": true,
"outDir": "lib",

View File

@ -1,5 +1,8 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"declarationDir": "typings"
},
"include": [
"./custom.d.ts",
"src/index.ts"

View File

@ -1,6 +1,8 @@
import * as webpack from 'webpack';
import * as HtmlWebpackPlugin from 'html-webpack-plugin';
/* tslint:disable:no-implicit-dependencies */
import * as ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
import * as HtmlWebpackPlugin from 'html-webpack-plugin';
import * as webpack from 'webpack';
import * as path from 'path';
const nodeExternals = require('webpack-node-externals')({
@ -54,8 +56,12 @@ export default (env: { standalone?: boolean } = {}, { mode }) => ({
}
: (context, request, callback) => {
// ignore node-fetch dep of swagger2openapi as it is not used
if (/node-fetch$/i.test(request)) return callback(null, 'var undefined');
if (/esprima$/i.test(request)) return callback(null, 'var undefined');
if (/node-fetch$/i.test(request)) {
return callback(null, 'var undefined');
}
if (/esprima$/i.test(request)) {
return callback(null, 'var undefined');
}
return nodeExternals(context, request, callback);
},
@ -69,6 +75,7 @@ export default (env: { standalone?: boolean } = {}, { mode }) => ({
options: {
compilerOptions: {
module: 'es2015',
declaration: false,
},
},
},