rsbuild.config.ts 663 B

123456789101112131415161718192021222324252627282930313233
  1. /**
  2. * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
  3. * SPDX-License-Identifier: MIT
  4. */
  5. import path from 'node:path';
  6. import { pluginReact } from '@rsbuild/plugin-react';
  7. import { defineConfig } from '@rsbuild/core';
  8. export default defineConfig({
  9. plugins: [
  10. pluginReact({
  11. swcReactOptions: {
  12. runtime: 'classic',
  13. },
  14. }),
  15. ],
  16. source: {
  17. entry: {
  18. index: './src/app.tsx',
  19. },
  20. },
  21. resolve: {
  22. alias: {
  23. react: path.resolve(__dirname, './node_modules/react'),
  24. 'react-dom': path.resolve(__dirname, './node_modules/react-dom'),
  25. },
  26. },
  27. html: {
  28. title: 'demo-free-layout-simple',
  29. },
  30. });