forked from uptick/react-interactive-tutorials
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
32 lines (31 loc) · 878 Bytes
/
webpack.config.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
let path = require('path');
let NodeExternals = require('webpack-node-externals');
module.exports = {
context: __dirname, // to automatically find tsconfig.json
entry: './src/init',
target: "web",
output: {
path: __dirname + '/dist',
filename: 'react-interactive-tutorials.js',
library: 'interactive_tutorials',
libraryTarget: "umd",
umdNamedDefine: true
},
resolve: {
extensions: [".ts", ".tsx", ".js", ".css"],
},
module: {
rules: [
{
test: /\.tsx?$/,
exclude: /node_modules/,
loader: 'ts-loader',
options: {
// disable type checker - we will use it in fork plugin
transpileOnly: true
}
},
],
},
externals: NodeExternals(),
};