23 lines
675 B
TypeScript
23 lines
675 B
TypeScript
import { defineConfig } from '@rsbuild/core';
|
|
import { pluginBabel } from '@rsbuild/plugin-babel';
|
|
import { pluginReact } from '@rsbuild/plugin-react';
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
pluginReact(),
|
|
pluginBabel({
|
|
include: /\.[jt]sx?$/,
|
|
exclude: [/[\\/]node_modules[\\/]/],
|
|
babelLoaderOptions(opts) {
|
|
opts.plugins?.unshift('babel-plugin-react-compiler');
|
|
},
|
|
}),
|
|
],
|
|
// PUBLIC_-prefixed env vars (e.g. PUBLIC_API_BASE_URL) are exposed natively
|
|
// by rsbuild on both import.meta.env and process.env from .env files —
|
|
// no manual source.define needed. See src/config/env.ts.
|
|
html: {
|
|
title: 'MCMA',
|
|
},
|
|
});
|