Skip to content

Commit

Permalink
chore: update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
pengzhanbo committed Sep 7, 2024
1 parent 1e3ccee commit c6a3b3c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 7 additions & 0 deletions examples/rsbuild-starter/rsbuild.config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
import path from 'node:path'
import { fileURLToPath } from 'node:url'
import { defineConfig } from '@rsbuild/core'
import { pluginMockServer } from 'rspack-plugin-mock/rsbuild'

export default defineConfig({
html: {
template: './index.html',
},
source: {
alias: {
'@': path.resolve(path.dirname(fileURLToPath(import.meta.url)), './src'),
},
},
server: {
proxy: {
'/api': 'http://localhost:8080',
Expand Down
4 changes: 3 additions & 1 deletion examples/rspack-starter/rspack.config.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// @ts-check

import path from 'node:path'
import { fileURLToPath } from 'node:url'
import { rspack } from '@rspack/core'
import { MockServerPlugin } from 'rspack-plugin-mock'

Expand All @@ -13,7 +15,7 @@ export default {
resolve: {
extensions: ['.js', '.ts'],
alias: {
'@': './src',
'@': path.resolve(path.dirname(fileURLToPath(import.meta.url)), './src'),
},
},
devServer: {
Expand Down

0 comments on commit c6a3b3c

Please sign in to comment.