-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rspack.config.js
48 lines (47 loc) · 1 KB
/
rspack.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
43
44
45
46
47
48
const { HtmlRspackPlugin } = require('@rspack/core')
const { VueLoaderPlugin } = require('vue-loader')
const VueMacros = require('unplugin-vue-macros/rspack')
/** @type {import('@rspack/core').Configuration} */
module.exports = {
context: __dirname,
mode: 'development',
entry: {
main: './src/main.js',
},
module: {
rules: [
{
test: /\.ts$/,
exclude: [/node_modules/],
loader: 'builtin:swc-loader',
options: {
sourceMap: true,
jsc: {
parser: {
syntax: 'typescript',
},
},
},
type: 'javascript/auto',
},
{
test: /\.vue$/,
loader: 'vue-loader',
options: { experimentalInlineMatchResource: true },
},
{
test: /\.png$/,
type: 'asset/source',
},
],
},
plugins: [
VueMacros({
defineModels: false,
}),
new VueLoaderPlugin(),
new HtmlRspackPlugin({
template: './index.html',
}),
],
}