Skip to content

Commit b71a2d3

Browse files
committed
chore: fix examples
1 parent c57b642 commit b71a2d3

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

Diff for: examples/rspack/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"private": true,
3+
"type": "module",
34
"author": "三咲智子 <[email protected]>",
45
"scripts": {
56
"serve": "MODE=development rspack serve",

Diff for: examples/rspack/rspack.config.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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'
44

55
/** @type {import('@rspack/core').Configuration} */
66
const config = {
@@ -33,10 +33,10 @@ const config = {
3333
},
3434
plugins: [
3535
Vue(),
36-
new rspack.HtmlRspackPlugin({
36+
new HtmlRspackPlugin({
3737
filename: 'index.html',
3838
template: 'public/index.html',
3939
}),
4040
],
4141
}
42-
module.exports = config
42+
export default config

Diff for: examples/webpack/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"private": true,
3+
"type": "module",
34
"author": "三咲智子 <[email protected]>",
45
"scripts": {
56
"serve": "MODE=development webpack serve",

Diff for: examples/webpack/webpack.config.ts renamed to examples/webpack/webpack.config.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import process from 'node:process'
22
import HtmlWebpackPlugin from 'html-webpack-plugin'
33
import Vue from 'unplugin-vue/webpack'
4-
import type { Configuration } from 'webpack'
54

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',
88
entry: {
99
app: './src/main.ts',
1010
},

0 commit comments

Comments
 (0)