Skip to content

Commit

Permalink
fix: fix some errors
Browse files Browse the repository at this point in the history
  • Loading branch information
imal1 committed Sep 19, 2024
1 parent c05f31e commit 8dd2043
Show file tree
Hide file tree
Showing 7 changed files with 120 additions and 8,635 deletions.
8 changes: 7 additions & 1 deletion playground/main.ts
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
document.getElementById('app')!.innerHTML = '__UNPLUGIN__'
const appElement = document.getElementById('app')
if (appElement) {
appElement.innerHTML = '__UNPLUGIN__'
}
else {
console.error('not found #app element')
}
2 changes: 1 addition & 1 deletion playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "playground",
"private": true,
"scripts": {
"dev": "nodemon -w '../src/**/*.ts' -e .ts -x rspack"
"dev": "nodemon -w '../src/**/*.ts' -e .ts -x rspack serve"
},
"devDependencies": {
"@rspack/cli": "^1.0.5",
Expand Down
4 changes: 4 additions & 0 deletions playground/rspack.config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import type { Configuration } from '@rspack/cli'
import { HtmlRspackPlugin } from '@rspack/core'
import Unplugin from '../src/rspack'

const config: Configuration = {
entry: './main.ts',
plugins: [
new HtmlRspackPlugin({
template: './index.html',
}),
Unplugin({ configFile: './iconfont.config.ts' }),
],
}
Expand Down
Loading

0 comments on commit 8dd2043

Please sign in to comment.