2018-08-15 01:38:00 +01:00
|
|
|
const path = require("path");
|
2017-12-22 16:49:25 +00:00
|
|
|
|
|
|
|
module.exports = {
|
2018-08-15 01:38:00 +01:00
|
|
|
entry: "./src/index.ts",
|
2017-12-22 16:49:25 +00:00
|
|
|
|
|
|
|
output: {
|
2018-08-15 01:38:00 +01:00
|
|
|
path: path.resolve("build"),
|
|
|
|
filename: "index.js",
|
|
|
|
libraryTarget: "umd",
|
2017-12-22 16:49:25 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
resolve: {
|
2018-08-15 01:38:00 +01:00
|
|
|
extensions: [".tsx", ".ts", ".js"],
|
|
|
|
modules: [path.resolve("./src"), "node_modules"],
|
2017-12-22 16:49:25 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
2017-12-29 01:11:59 +00:00
|
|
|
test: /\.ts$/,
|
|
|
|
loaders: ["awesome-typescript-loader"],
|
2018-08-15 01:38:00 +01:00
|
|
|
},
|
2018-10-26 20:11:40 +01:00
|
|
|
{
|
|
|
|
// For coverage testing
|
|
|
|
test: /\.(ts)/,
|
|
|
|
include: path.resolve("src"),
|
|
|
|
loader: "istanbul-instrumenter-loader",
|
|
|
|
enforce: "post",
|
|
|
|
exclude: [/node_modules/],
|
|
|
|
}
|
2017-12-29 01:11:59 +00:00
|
|
|
],
|
2017-12-22 16:49:25 +00:00
|
|
|
},
|
2017-12-29 01:11:59 +00:00
|
|
|
|
2018-08-15 01:38:00 +01:00
|
|
|
// Because docx is now targetting web
|
|
|
|
// target: 'node',
|
2017-12-22 16:49:25 +00:00
|
|
|
};
|