-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.dev.js
42 lines (40 loc) · 992 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
38
39
40
41
42
// @ts-nocheck
/* eslint-disable import/no-extraneous-dependencies */
/* eslint-disable @typescript-eslint/no-var-requires */
const webpack = require('webpack')
const merge = require('webpack-merge')
const path = require('path')
const Dotenv = require('dotenv-webpack')
const common = require('./webpack.common.js')
module.exports = merge(common, {
entry: './client/index.tsx',
output: {
path: path.resolve(__dirname, 'assets/local'),
filename: 'bundle.js',
chunkFilename: '[name].chunk.js'
},
module: {
rules: [
{
test: [/\.(ttf|woff|woff2|eot)$/],
use: [
{
loader: 'file-loader',
options: {
name: '[name].[ext]',
outputPath: '/assets/dist/fonts/',
publicPath: '/assets/dist/fonts/'
}
}
]
}
]
},
node: { fs: 'empty' },
plugins: [
new webpack.DefinePlugin({
__isBrowser__: 'true'
}),
new Dotenv()
]
})