Use a typescript webpack config
This commit is contained in:
36
webpack.config.ts
Normal file
36
webpack.config.ts
Normal file
@ -0,0 +1,36 @@
|
||||
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',
|
||||
};
|
Reference in New Issue
Block a user