-
Notifications
You must be signed in to change notification settings - Fork 81
Expand file tree
/
Copy pathwebpack.base.js
More file actions
31 lines (29 loc) · 773 Bytes
/
webpack.base.js
File metadata and controls
31 lines (29 loc) · 773 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
const path = require('path');
const rootDir = process.cwd();
module.exports = {
entry: path.resolve(rootDir, 'src/index.ts'),
output: {
path: path.resolve(rootDir, 'dist'),
filename: 'bundle.[contenthash:8].js',
},
module: {
rules: [
{
test: /\.(jsx|js)$/,
use: 'babel-loader',
include: path.resolve(rootDir, 'src'),
exclude: /node_modules/,
},
{ test: /\.tsx?$/, use: ["ts-loader"], exclude: /node_modules/ }
]
},
plugins: [
// new HtmlWebpackPlugin({
// template: path.resolve(rootDir, 'public/test.ejs'),
// inject: 'body',
// scriptLoading: 'blocking',
// }),
// new CleanWebpackPlugin(),
// new ClassToStyleWebpackPlugin({outFileName:"buildInfo"})
],
}