-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathwebpack.config.js
More file actions
33 lines (32 loc) · 914 Bytes
/
webpack.config.js
File metadata and controls
33 lines (32 loc) · 914 Bytes
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
const path = require("path");
module.exports = {
devtool: 'eval-source-map',
mode: 'development',
entry: "./src/Reader.ts", //relative entrypoint path
resolve: {
extensions: [".ts", ".js"]
},
module: {
rules: [
{
test: /\.ts$/, //if typescript file
use: "ts-loader", //turn into js
include: [path.resolve(__dirname, 'src')] //only if they are in the src folder
}
]
},
output: {
publicPath: "build",
filename: "WebRICE.js", //name of the outputfile
path: path.resolve(__dirname, "build"), //Absolute path from this file to build
library: 'WebRICE',
libraryTarget: 'umd',
},
devServer: {
contentBase: path.join(__dirname, 'build'),
compress: true,
port: 3000,
open: true,
publicPath: "/",
}
}