-
Notifications
You must be signed in to change notification settings - Fork 3
/
webpack.dev.js
37 lines (36 loc) · 907 Bytes
/
webpack.dev.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
const path = require("path");
const ForkTsCheckerWebpackPlugin = require("fork-ts-checker-webpack-plugin");
module.exports = {
mode: "development",
context: __dirname, // to automatically find tsconfig.json
entry: "./src/index.ts",
plugins: [
new ForkTsCheckerWebpackPlugin({
eslint: {
files: './src/**/*.{ts,tsx,js,jsx}' // required - same as command `eslint ./src/**/*.{ts,tsx,js,jsx} --ext .ts,.tsx,.js,.jsx`
}
}),
],
devtool: "source-map",
module: {
rules: [
{
test: /\.tsx?$/,
use: [
{loader: "ts-loader", options: {transpileOnly: true}}
],
exclude: /node_modules/,
},
],
},
resolve: {
extensions: [".tsx", ".ts", "js"],
},
output: {
path: path.resolve(__dirname, "dist"),
filename: "xspy.js",
library: "xspy",
libraryExport: "default",
libraryTarget: "umd",
}
};