diff --git a/package.json b/package.json index 57ab21b8ff..36701f7ea2 100644 --- a/package.json +++ b/package.json @@ -64,6 +64,7 @@ "@types/mocha": "^2.2.39", "@types/request-promise": "^4.1.42", "@types/sinon": "^4.3.1", + "@types/webpack": "^4.4.24", "awesome-typescript-loader": "^3.4.1", "chai": "^3.5.0", "glob": "^7.1.2", diff --git a/tsconfig.json b/tsconfig.json index 59d86f2400..a2d4c199ef 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -23,7 +23,8 @@ "tests", "**/_*", "demo", - "scripts" + "scripts", + "webpack.config.ts" ], "typedocOptions": { "mode": "file", diff --git a/webpack.config.js b/webpack.config.ts similarity index 83% rename from webpack.config.js rename to webpack.config.ts index 40ec0b0d23..e048202003 100644 --- a/webpack.config.js +++ b/webpack.config.ts @@ -1,4 +1,6 @@ -const path = require("path"); +// tslint:disable:no-object-literal-type-assertion +import * as path from "path"; +import { Configuration } from "webpack"; module.exports = { entry: "./src/index.ts", @@ -27,10 +29,10 @@ module.exports = { loader: "istanbul-instrumenter-loader", enforce: "post", exclude: [/node_modules/], - } + }, ], }, // Because docx is now targetting web // target: 'node', -}; +} as Configuration;