Skip to content

Commit

Permalink
chore: fix examples
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz committed Feb 6, 2025
1 parent c57b642 commit b71a2d3
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
1 change: 1 addition & 0 deletions examples/rspack/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"private": true,
"type": "module",
"author": "三咲智子 <[email protected]>",
"scripts": {
"serve": "MODE=development rspack serve",
Expand Down
10 changes: 5 additions & 5 deletions examples/rspack/rspack.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const process = require('node:process')
const rspack = require('@rspack/core')
const Vue = require('unplugin-vue/rspack')
import process from 'node:process'
import { HtmlRspackPlugin } from '@rspack/core'
import Vue from 'unplugin-vue/rspack'

/** @type {import('@rspack/core').Configuration} */
const config = {
Expand Down Expand Up @@ -33,10 +33,10 @@ const config = {
},
plugins: [
Vue(),
new rspack.HtmlRspackPlugin({
new HtmlRspackPlugin({
filename: 'index.html',
template: 'public/index.html',
}),
],
}
module.exports = config
export default config
1 change: 1 addition & 0 deletions examples/webpack/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"private": true,
"type": "module",
"author": "三咲智子 <[email protected]>",
"scripts": {
"serve": "MODE=development webpack serve",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import process from 'node:process'
import HtmlWebpackPlugin from 'html-webpack-plugin'
import Vue from 'unplugin-vue/webpack'
import type { Configuration } from 'webpack'

const config: Configuration = {
mode: (process.env.MODE as any) ?? 'development',
/** @type import('webpack').Configuration */
const config = {
mode: process.env.MODE ?? 'development',
entry: {
app: './src/main.ts',
},
Expand Down

0 comments on commit b71a2d3

Please sign in to comment.