Files
docx-js/webpack.config.js
2018-10-26 20:11:40 +01:00

37 lines
836 B
JavaScript

const path = require("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',
};