File tree Expand file tree Collapse file tree 4 files changed +10
-8
lines changed Expand file tree Collapse file tree 4 files changed +10
-8
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"private" : true ,
3
+ "type" : " module" ,
3
4
"author" : " 三咲智子 <sxzz@sxzz.moe>" ,
4
5
"scripts" : {
5
6
"serve" : " MODE=development rspack serve" ,
Original file line number Diff line number Diff line change 1
- const process = require ( 'node:process' )
2
- const rspack = require ( '@rspack/core' )
3
- const Vue = require ( 'unplugin-vue/rspack' )
1
+ import process from 'node:process'
2
+ import { HtmlRspackPlugin } from '@rspack/core'
3
+ import Vue from 'unplugin-vue/rspack'
4
4
5
5
/** @type {import('@rspack/core').Configuration } */
6
6
const config = {
@@ -33,10 +33,10 @@ const config = {
33
33
} ,
34
34
plugins : [
35
35
Vue ( ) ,
36
- new rspack . HtmlRspackPlugin ( {
36
+ new HtmlRspackPlugin ( {
37
37
filename : 'index.html' ,
38
38
template : 'public/index.html' ,
39
39
} ) ,
40
40
] ,
41
41
}
42
- module . exports = config
42
+ export default config
Original file line number Diff line number Diff line change 1
1
{
2
2
"private" : true ,
3
+ "type" : " module" ,
3
4
"author" : " 三咲智子 <sxzz@sxzz.moe>" ,
4
5
"scripts" : {
5
6
"serve" : " MODE=development webpack serve" ,
Original file line number Diff line number Diff line change 1
1
import process from 'node:process'
2
2
import HtmlWebpackPlugin from 'html-webpack-plugin'
3
3
import Vue from 'unplugin-vue/webpack'
4
- import type { Configuration } from 'webpack'
5
4
6
- const config : Configuration = {
7
- mode : ( process . env . MODE as any ) ?? 'development' ,
5
+ /** @type import('webpack').Configuration */
6
+ const config = {
7
+ mode : process . env . MODE ?? 'development' ,
8
8
entry : {
9
9
app : './src/main.ts' ,
10
10
} ,
You can’t perform that action at this time.
0 commit comments