Files
docx-js/webpack.config.ts
2019-01-16 13:34:32 +00:00

37 lines
837 B
TypeScript

import * as path from "path";
module.exports = {
entry: "./src/index.ts",
output: {
path: path.resolve("build"),
filename: "index.js",
libraryTarget: "umd",
},
resolve: {
extensions: [".tsx", ".ts", ".js"],
modules: [path.resolve("./src"), "node_modules"],
},
module: {
rules: [
{
test: /\.ts$/,
loaders: ["awesome-typescript-loader"],
},
{
// For coverage testing
test: /\.(ts)/,
include: path.resolve("src"),
loader: "istanbul-instrumenter-loader",
enforce: "post",
exclude: [/node_modules/],
},
],
},
// Because docx is now targetting web
// target: 'node',
};