forked from typewriter-editor/typewriter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.dev.config.js
42 lines (41 loc) · 915 Bytes
/
webpack.dev.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
33
34
35
36
37
38
39
40
41
42
const path = require('path');
module.exports = {
entry: path.resolve(__dirname, 'examples/index.ts'),
mode: 'development',
output: {
path: path.resolve(__dirname, 'examples/public'),
filename: 'bundle.js',
library: 'typewriter',
},
module: {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/,
},
{
test: /\.svelte$/,
use: 'svelte-loader'
},
{
test: /\.txt$/,
use: 'raw-loader'
}
],
},
devtool: 'source-map',
resolve: {
extensions: [ '.ts', '.tsx', '.js' ],
alias: {
'typewriter-editor$': path.resolve(__dirname, 'src/index.ts'),
'typewriter-editor/lib': path.resolve(__dirname, 'src'),
},
},
devServer: {
contentBase: path.join(__dirname, 'examples/public'),
port: 9000,
host: '0.0.0.0',
historyApiFallback: true,
},
};