-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.conf.js
51 lines (51 loc) · 1.12 KB
/
webpack.conf.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
43
44
45
46
47
48
49
50
51
/*
* @Description:
* @Date: 2022-07-08 17:54:21
*/
const path = require('path');
const { VueLoaderPlugin } = require('vue-loader');
const htmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
mode: 'development',
entry: './public/example/index.ts',
output: {
path: path.resolve(__dirname, 'localdev'),
filename: 'bundle.js'
},
module: {
rules: [
{
test: /\.tsx?$/,
use: [
{
loader: 'ts-loader',
options: {
transpileOnly: true,
appendTsSuffixTo: ['\\.vue$'],
happyPackMode: false
}
}
],
exclude: /node_modules/
},
{
test: /\.s(c|a)ss$/,
use: ['style-loader', 'css-loader', 'sass-loader']
},
{
test: /\.css$/,
use: ['style-loader', 'css-loader']
},
{ test: /\.vue$/, use: 'vue-loader' }
]
},
plugins: [
new VueLoaderPlugin(),
new htmlWebpackPlugin({
template: './public/index.html'
})
],
resolve: {
extensions: ['.js', '.jsx', '.ts', '.tsx', '.vue', '.json']
}
};