-
-
Notifications
You must be signed in to change notification settings - Fork 257
Closed as not planned
Closed as not planned
Copy link
Labels
Description
Version
System:
OS: Windows 10 10.0.19045
CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
Memory: 3.03 GB / 15.79 GB
Browsers:
Internet Explorer: 11.0.19041.5794
npmPackages:
@rsbuild/core: ^1.4.13 => 1.4.15
@rsbuild/plugin-less: ^1.4.0 => 1.4.0
@rsbuild/plugin-node-polyfill: ^1.3.0 => 1.3.0
@rsbuild/plugin-react: ^1.3.4 => 1.3.4
@rsbuild/plugin-svgr: ^1.2.1 => 1.2.1
@rsbuild/plugin-umd: ^1.0.4 => 1.0.4Details
Usage
.description {
background: rgba(255, 255, 255, 0.60) url("./images/bg.png") no-repeat right;
}import ResizerIcon from '../../assets/icon/resizer.svg?react';
<ResizerIcon />rsbuild.config.ts
import { defineConfig } from '@rsbuild/core';
import packageJson from './package.json';
import path from 'path';
import { pluginReact } from '@rsbuild/plugin-react';
import { pluginLess } from '@rsbuild/plugin-less';
import { pluginUmd } from '@rsbuild/plugin-umd';
import { pluginNodePolyfill } from '@rsbuild/plugin-node-polyfill';
import { pluginSvgr } from '@rsbuild/plugin-svgr';
const BASE_URL = '/agent_flow-static';
const PORTAL_URL = process.env.PORTAL_URL;
export default defineConfig(({ env }) => {
return {
plugins: [
pluginNodePolyfill(),
pluginReact(),
pluginLess(),
pluginUmd({ name: packageJson.name }),
pluginSvgr(),
],
html: {
scriptLoading: 'defer',
tags: [
{
tag: 'script',
attrs: { src: `${BASE_URL}/config.js?t=${Date.now()}` },
publicPath: false,
},
],
},
output: {
cssModules: {
auto: (resource) => {
return resource.endsWith('.less');
},
},
},
source: {
define: {
'process.env.BASE_URL': JSON.stringify(BASE_URL),
'process.env.PORTAL_URL': JSON.stringify(PORTAL_URL),
},
},
server: {
base: BASE_URL,
proxy: {
},
},
};
});
**rspack.config.web.mjs**
``` typescript
export default {
target: [
'web',
'es2017'
],
name: 'web',
devtool: 'cheap-module-source-map',
context: 'E:\\Projects\\agentflow-web-3\\projects\\agentflow',
mode: 'development',
infrastructureLogging: {
level: 'error'
},
watchOptions: {
aggregateTimeout: 0
},
experiments: {
typeReexportsPresence: true,
rspackFuture: {
bundlerInfo: {
force: false,
version: '1.4.11',
bundler: 'rspack'
}
},
asyncWebAssembly: true
},
output: {
devtoolModuleFilenameTemplate: (info)=>toPosixPath(info.absoluteResourcePath),
path: 'E:\\Projects\\agentflow-web-3\\projects\\agentflow\\dist',
filename: '[name].js',
chunkFilename: 'async/[name].js',
publicPath: '/agent_flow-static/',
pathinfo: false,
hashFunction: 'xxhash64',
assetModuleFilename: 'static/assets/[name][ext]',
webassemblyModuleFilename: 'static/wasm/[hash].module.wasm',
library: {
name: 'agentflow',
type: 'umd',
umdNamedDefine: true,
'export': undefined
},
globalObject: 'this'
},
resolve: {
tsConfig: {
configFile: 'E:\\Projects\\agentflow-web-3\\projects\\agentflow\\tsconfig.json',
references: 'auto'
},
alias: {
'@swc/helpers': 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\@[email protected]\\node_modules\\@swc\\helpers',
'react-refresh': 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\react-refresh'
},
fallback: {
assert: 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\assert\\build\\assert.js',
'node:assert': 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\assert\\build\\assert.js',
buffer: 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\buffer\\index.js',
'node:buffer': 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\buffer\\index.js',
child_process: false,
'node:child_process': false,
cluster: false,
'node:cluster': false,
console: 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\console-browserify\\index.js',
'node:console': 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\console-browserify\\index.js',
constants: 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\constants-browserify\\constants.json',
'node:constants': 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\constants-browserify\\constants.json',
crypto: 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\crypto-browserify\\index.js',
'node:crypto': 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\crypto-browserify\\index.js',
dgram: false,
'node:dgram': false,
dns: false,
'node:dns': false,
domain: 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\domain-browser\\source\\index.js',
'node:domain': 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\domain-browser\\source\\index.js',
events: 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\events\\events.js',
'node:events': 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\events\\events.js',
fs: false,
'node:fs': false,
http: 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\stream-http\\index.js',
'node:http': 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\stream-http\\index.js',
https: 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\https-browserify\\index.js',
'node:https': 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\https-browserify\\index.js',
module: false,
'node:module': false,
net: false,
'node:net': false,
os: 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\os-browserify\\browser.js',
'node:os': 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\os-browserify\\browser.js',
path: 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\path-browserify\\index.js',
'node:path': 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\path-browserify\\index.js',
punycode: 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\punycode\\punycode.js',
'node:punycode': 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\punycode\\punycode.js',
process: 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\process\\browser.js',
'node:process': 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\process\\browser.js',
querystring: 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\querystring-es3\\index.js',
'node:querystring': 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\querystring-es3\\index.js',
readline: false,
'node:readline': false,
repl: false,
'node:repl': false,
stream: 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\stream-browserify\\index.js',
'node:stream': 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\stream-browserify\\index.js',
_stream_duplex: 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\readable-stream\\lib\\_stream_duplex.js',
'node:_stream_duplex': 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\readable-stream\\lib\\_stream_duplex.js',
_stream_passthrough: 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\readable-stream\\lib\\_stream_passthrough.js',
'node:_stream_passthrough': 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\readable-stream\\lib\\_stream_passthrough.js',
_stream_readable: 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\readable-stream\\lib\\_stream_readable.js',
'node:_stream_readable': 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\readable-stream\\lib\\_stream_readable.js',
_stream_transform: 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\readable-stream\\lib\\_stream_transform.js',
'node:_stream_transform': 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\readable-stream\\lib\\_stream_transform.js',
_stream_writable: 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\readable-stream\\lib\\_stream_writable.js',
'node:_stream_writable': 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\readable-stream\\lib\\_stream_writable.js',
string_decoder: 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\string_decoder\\lib\\string_decoder.js',
'node:string_decoder': 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\string_decoder\\lib\\string_decoder.js',
sys: 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\util\\util.js',
'node:sys': 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\util\\util.js',
timers: 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\timers-browserify\\main.js',
'node:timers': 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\timers-browserify\\main.js',
tls: false,
'node:tls': false,
tty: 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\tty-browserify\\index.js',
'node:tty': 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\tty-browserify\\index.js',
url: 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\url\\url.js',
'node:url': 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\url\\url.js',
util: 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\util\\util.js',
'node:util': 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\util\\util.js',
vm: 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\vm-browserify\\index.js',
'node:vm': 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\vm-browserify\\index.js',
zlib: 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\browserify-zlib\\lib\\index.js',
'node:zlib': 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\browserify-zlib\\lib\\index.js'
},
extensionAlias: {
'.js': [
'.js',
'.ts',
'.tsx'
],
'.jsx': [
'.jsx',
'.tsx'
]
},
extensions: [
'.ts',
'.tsx',
'.mjs',
'.js',
'.jsx',
'.json'
]
},
module: {
parser: {
javascript: {
exportsPresence: 'error',
typeReexportsPresence: 'tolerant'
}
},
rules: [
/* config.module.rule('mjs') */
{
test: /\.m?js/,
resolve: {
fullySpecified: false
}
},
/* config.module.rule('css') */
{
test: /\.css$/,
type: 'javascript/auto',
dependency: {
not: 'url'
},
resourceQuery: {
not: [
/^\?raw$/,
/^\?inline$/
]
},
sideEffects: true,
use: [
/* config.module.rule('css').use('mini-css-extract') */
{
loader: 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\@[email protected]_@[email protected]\\node_modules\\@rspack\\core\\dist\\cssExtractLoader.js'
},
/* config.module.rule('css').use('css') */
{
loader: 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\@[email protected]\\node_modules\\@rsbuild\\core\\compiled\\css-loader\\index.js',
options: {
importLoaders: 1,
modules: {
auto: (resource) => {
return resource.endsWith('.less');
},
namedExport: false,
exportGlobals: false,
exportLocalsConvention: 'camelCase',
localIdentName: '[path][name]__[local]-[hash:base64:6]'
},
sourceMap: false
}
},
/* config.module.rule('css').use('lightningcss') */
{
loader: 'builtin:lightningcss-loader',
options: {
targets: [
'chrome >= 87',
'edge >= 88',
'firefox >= 78',
'safari >= 14'
],
errorRecovery: true
}
}
],
resolve: {
preferRelative: true
}
},
/* config.module.rule('css-inline') */
{
test: /\.css$/,
type: 'javascript/auto',
resourceQuery: /^\?inline$/,
sideEffects: true,
use: [
/* config.module.rule('css-inline').use('css') */
{
loader: 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\@[email protected]\\node_modules\\@rsbuild\\core\\compiled\\css-loader\\index.js',
options: {
importLoaders: 1,
modules: false,
sourceMap: false,
exportType: 'string'
}
},
/* config.module.rule('css-inline').use('lightningcss') */
{
loader: 'builtin:lightningcss-loader',
options: {
targets: [
'chrome >= 87',
'edge >= 88',
'firefox >= 78',
'safari >= 14'
],
errorRecovery: true
}
}
],
resolve: {
preferRelative: true
}
},
/* config.module.rule('css-raw') */
{
test: /\.css$/,
type: 'asset/source',
resourceQuery: /^\?raw$/
},
/* config.module.rule('js') */
{
test: /\.(?:js|jsx|mjs|cjs|ts|tsx|mts|cts)$/,
type: 'javascript/auto',
dependency: {
not: 'url'
},
resourceQuery: {
not: /^\?raw$/
},
include: [
{
not: /[\\/]node_modules[\\/]/
},
/\.(?:ts|tsx|jsx|mts|cts)$/,
/[\\/]@rsbuild[\\/]core[\\/]dist[\\/]/
],
use: [
/* config.module.rule('js').use('swc') */
{
loader: 'builtin:swc-loader',
options: {
jsc: {
externalHelpers: true,
parser: {
tsx: true,
syntax: 'typescript',
decorators: true
},
experimental: {
cacheRoot: 'E:\\Projects\\agentflow-web-3\\projects\\agentflow\\node_modules\\.cache\\.swc',
keepImportAttributes: true
},
output: {
charset: 'utf8'
},
transform: {
legacyDecorator: false,
decoratorVersion: '2022-03',
react: {
development: true,
refresh: true,
runtime: 'automatic'
}
}
},
isModule: 'unknown',
env: {
targets: [
'chrome >= 87',
'edge >= 88',
'firefox >= 78',
'safari >= 14'
],
mode: undefined
},
rspackExperiments: {
collectTypeScriptInfo: {
typeExports: true,
exportedEnum: false
}
}
}
}
]
},
/* config.module.rule('js-raw') */
{
test: /\.(?:js|jsx|mjs|cjs|ts|tsx|mts|cts)$/,
type: 'asset/source',
resourceQuery: /^\?raw$/
},
/* config.module.rule('js-data-uri') */
{
mimetype: {
or: [
'text/javascript',
'application/javascript'
]
},
use: [
/* config.module.rule('js-data-uri').use('swc') */
{
loader: 'builtin:swc-loader',
options: {
jsc: {
externalHelpers: true,
parser: {
tsx: true,
syntax: 'typescript',
decorators: true
},
experimental: {
cacheRoot: 'E:\\Projects\\agentflow-web-3\\projects\\agentflow\\node_modules\\.cache\\.swc',
keepImportAttributes: true
},
output: {
charset: 'utf8'
},
transform: {
legacyDecorator: false,
decoratorVersion: '2022-03',
react: {
development: true,
refresh: true,
runtime: 'automatic'
}
}
},
isModule: 'unknown',
env: {
targets: [
'chrome >= 87',
'edge >= 88',
'firefox >= 78',
'safari >= 14'
],
mode: undefined
},
rspackExperiments: {
collectTypeScriptInfo: {
typeExports: true,
exportedEnum: false
}
}
}
}
],
resolve: {
fullySpecified: false
}
},
/* config.module.rule('image') */
{
test: /\.(?:png|jpg|jpeg|pjpeg|pjp|gif|bmp|webp|ico|apng|avif|tif|tiff|jfif|cur)$/i,
oneOf: [
/* config.module.rule('image').oneOf('image-asset-url') */
{
type: 'asset/resource',
resourceQuery: /^\?(__inline=false|url)$/,
generator: {
filename: 'static/image/[name][ext]'
}
},
/* config.module.rule('image').oneOf('image-asset-inline') */
{
type: 'asset/inline',
resourceQuery: /^\?inline$/
},
/* config.module.rule('image').oneOf('image-asset-raw') */
{
type: 'asset/source',
resourceQuery: /^\?raw$/
},
/* config.module.rule('image').oneOf('image-asset') */
{
type: 'asset',
parser: {
dataUrlCondition: {
maxSize: 4096
}
},
generator: {
filename: 'static/image/[name][ext]'
}
}
]
},
/* config.module.rule('media') */
{
test: /\.(?:mp4|webm|ogg|mov|mp3|wav|flac|aac|m4a|opus)$/i,
oneOf: [
/* config.module.rule('media').oneOf('media-asset-url') */
{
type: 'asset/resource',
resourceQuery: /^\?(__inline=false|url)$/,
generator: {
filename: 'static/media/[name][ext]'
}
},
/* config.module.rule('media').oneOf('media-asset-inline') */
{
type: 'asset/inline',
resourceQuery: /^\?inline$/
},
/* config.module.rule('media').oneOf('media-asset-raw') */
{
type: 'asset/source',
resourceQuery: /^\?raw$/
},
/* config.module.rule('media').oneOf('media-asset') */
{
type: 'asset',
parser: {
dataUrlCondition: {
maxSize: 4096
}
},
generator: {
filename: 'static/media/[name][ext]'
}
}
]
},
/* config.module.rule('font') */
{
test: /\.(?:woff|woff2|eot|ttf|otf|ttc)$/i,
oneOf: [
/* config.module.rule('font').oneOf('font-asset-url') */
{
type: 'asset/resource',
resourceQuery: /^\?(__inline=false|url)$/,
generator: {
filename: 'static/font/[name][ext]'
}
},
/* config.module.rule('font').oneOf('font-asset-inline') */
{
type: 'asset/inline',
resourceQuery: /^\?inline$/
},
/* config.module.rule('font').oneOf('font-asset-raw') */
{
type: 'asset/source',
resourceQuery: /^\?raw$/
},
/* config.module.rule('font').oneOf('font-asset') */
{
type: 'asset',
parser: {
dataUrlCondition: {
maxSize: 4096
}
},
generator: {
filename: 'static/font/[name][ext]'
}
}
]
},
/* config.module.rule('wasm') */
{
test: /\.wasm$/,
dependency: 'url',
type: 'asset/resource',
generator: {
filename: 'static/wasm/[hash].module.wasm'
}
},
/* config.module.rule('less') */
{
test: /\.less$/,
resourceQuery: {
not: [
/^\?raw$/,
/^\?inline$/
]
},
sideEffects: true,
dependency: {
not: 'url'
},
use: [
/* config.module.rule('less').use('mini-css-extract') */
{
loader: 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\@[email protected]_@[email protected]\\node_modules\\@rspack\\core\\dist\\cssExtractLoader.js'
},
/* config.module.rule('less').use('css') */
{
loader: 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\@[email protected]\\node_modules\\@rsbuild\\core\\compiled\\css-loader\\index.js',
options: {
importLoaders: 2,
modules: {
auto: (resource) => {
return resource.endsWith('.less');
},
namedExport: false,
exportGlobals: false,
exportLocalsConvention: 'camelCase',
localIdentName: '[path][name]__[local]-[hash:base64:6]'
},
sourceMap: false
}
},
/* config.module.rule('less').use('lightningcss') */
{
loader: 'builtin:lightningcss-loader',
options: {
targets: [
'chrome >= 87',
'edge >= 88',
'firefox >= 78',
'safari >= 14'
],
errorRecovery: true
}
},
/* config.module.rule('less').use('less') */
{
loader: 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\@[email protected]_@[email protected]\\node_modules\\@rsbuild\\plugin-less\\compiled\\less-loader\\index.js',
options: {
lessOptions: {
javascriptEnabled: true,
paths: [
'E:\\Projects\\agentflow-web-3\\projects\\agentflow\\node_modules'
]
},
sourceMap: false,
implementation: 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\@[email protected]_@[email protected]\\node_modules\\@rsbuild\\plugin-less\\compiled\\less\\index.js'
}
}
],
resolve: {
preferRelative: true
}
},
/* config.module.rule('less-inline') */
{
test: /\.less$/,
resourceQuery: /^\?inline$/,
use: [
/* config.module.rule('less-inline').use('css') */
{
loader: 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\@[email protected]\\node_modules\\@rsbuild\\core\\compiled\\css-loader\\index.js',
options: {
importLoaders: 2,
modules: false,
sourceMap: false,
exportType: 'string'
}
},
/* config.module.rule('less-inline').use('lightningcss') */
{
loader: 'builtin:lightningcss-loader',
options: {
targets: [
'chrome >= 87',
'edge >= 88',
'firefox >= 78',
'safari >= 14'
],
errorRecovery: true
}
},
/* config.module.rule('less-inline').use('less') */
{
loader: 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\@[email protected]_@[email protected]\\node_modules\\@rsbuild\\plugin-less\\compiled\\less-loader\\index.js',
options: {
lessOptions: {
javascriptEnabled: true,
paths: [
'E:\\Projects\\agentflow-web-3\\projects\\agentflow\\node_modules'
]
},
sourceMap: false,
implementation: 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\@[email protected]_@[email protected]\\node_modules\\@rsbuild\\plugin-less\\compiled\\less\\index.js'
}
}
]
},
/* config.module.rule('less-raw') */
{
test: /\.less$/,
type: 'asset/source',
resourceQuery: /^\?raw$/
},
/* config.module.rule('svg') */
{
test: /\.svg$/,
oneOf: [
/* config.module.rule('svg').oneOf('svg-asset-url') */
{
type: 'asset/resource',
resourceQuery: /^\?(__inline=false|url)$/,
generator: {
filename: 'static/svg/[name].svg'
}
},
/* config.module.rule('svg').oneOf('svg-asset-inline') */
{
type: 'asset/inline',
resourceQuery: /^\?inline$/
},
/* config.module.rule('svg').oneOf('svg-asset-raw') */
{
type: 'asset/source',
resourceQuery: /^\?raw$/
},
/* config.module.rule('svg').oneOf('svg-react') */
{
type: 'javascript/auto',
resourceQuery: /react/,
use: [
/* config.module.rule('svg').oneOf('svg-react').use('swc') */
{
loader: 'builtin:swc-loader',
options: {
jsc: {
externalHelpers: true,
parser: {
tsx: true,
syntax: 'typescript',
decorators: true
},
experimental: {
cacheRoot: 'E:\\Projects\\agentflow-web-3\\projects\\agentflow\\node_modules\\.cache\\.swc',
keepImportAttributes: true
},
output: {
charset: 'utf8'
},
transform: {
legacyDecorator: false,
decoratorVersion: '2022-03',
react: {
development: true,
refresh: true,
runtime: 'automatic'
}
}
},
isModule: 'unknown',
env: {
targets: [
'chrome >= 87',
'edge >= 88',
'firefox >= 78',
'safari >= 14'
],
mode: undefined
},
rspackExperiments: {
collectTypeScriptInfo: {
typeExports: true,
exportedEnum: false
}
}
}
},
/* config.module.rule('svg').oneOf('svg-react').use('svgr') */
{
loader: 'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\@[email protected]_@[email protected][email protected]\\node_modules\\@rsbuild\\plugin-svgr\\dist\\loader.mjs',
options: {
svgo: true,
svgoConfig: {
plugins: [
{
name: 'preset-default',
params: {
overrides: {
removeViewBox: false
}
}
},
'prefixIds'
]
},
exportType: 'default'
}
}
]
},
/* config.module.rule('svg').oneOf('svg-asset') */
{
type: 'asset',
parser: {
dataUrlCondition: {
maxSize: 4096
}
},
generator: {
filename: 'static/svg/[name].svg'
}
}
]
}
]
},
optimization: {
minimize: false,
splitChunks: false
},
plugins: [
/* config.plugin('mini-css-extract') */
new CssExtractRspackPlugin(
{
filename: '[name].css',
chunkFilename: 'async/[name].css',
ignoreOrder: true
}
),
/* config.plugin('RsbuildCorePlugin') */
{},
/* config.plugin('hmr') */
new HotModuleReplacementPlugin(),
/* config.plugin('html-index') */
new HtmlRspackPlugin(
{
meta: {
charset: {
charset: 'UTF-8'
},
viewport: 'width=device-width, initial-scale=1.0'
},
chunks: [
'index'
],
inject: 'head',
filename: 'index.html',
entryName: 'index',
templateParameters: (compilation, assets, assetTags, pluginOptions)=>{
let { mountId, templateParameters } = config.html, rspackConfig = compilation.options, htmlPlugin = {
tags: assetTags,
files: assets,
options: pluginOptions
};
return reduceConfigsWithContext({
initial: {
mountId,
entryName: entryName,
assetPrefix: assetPrefix,
compilation,
htmlPlugin,
rspackConfig,
webpackConfig: rspackConfig,
htmlWebpackPlugin: htmlPlugin
},
config: templateParameters,
ctx: {
entryName: entryName
}
});
},
scriptLoading: 'defer',
title: 'Rsbuild App',
template: '',
templateContent: '<!doctype html><html><head></head><body><div id="root"></div></body></html>'
}
),
/* config.plugin('rsbuild-html-plugin') */
new RsbuildHtmlPlugin(
(entryName)=>extraDataMap.get(entryName)
),
/* config.plugin('define') */
new DefinePlugin(
{
'import.meta.env.MODE': '"development"',
'import.meta.env.DEV': true,
'import.meta.env.PROD': false,
'import.meta.env.BASE_URL': '"/agent_flow-static"',
'import.meta.env.ASSET_PREFIX': '"/agent_flow-static"',
'process.env.BASE_URL': '"/agent_flow-static"',
'process.env.ASSET_PREFIX': '"/agent_flow-static"',
'process.env.PORTAL_URL': '"http://xxxxx.test/"'
}
),
/* config.plugin('node-polyfill-provide') */
new ProvidePlugin(
{
Buffer: [
'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\buffer\\index.js',
'Buffer'
],
process: [
'E:\\Projects\\agentflow-web-3\\node_modules\\.pnpm\\[email protected]\\node_modules\\process\\browser.js'
]
}
),
/* config.plugin('protocol-imports') */
new ProtocolImportsPlugin(),
/* config.plugin('react-fast-refresh') */
new ReactRefreshRspackPlugin(
{
include: [
/\.(?:js|jsx|mjs|cjs|ts|tsx|mts|cts)$/
],
exclude: [
/[\\/]node_modules[\\/]/
],
resourceQuery: {
not: /^\?raw$/
},
forceEnable: false,
injectLoader: true,
injectEntry: true,
overlay: false
}
)
],
performance: {
hints: false,
maxAssetSize: 250000,
maxEntrypointSize: 250000
},
entry: {
index: [
'E:\\Projects\\agentflow-web-3\\projects\\agentflow\\src\\index.tsx'
]
}
}Reproduce link
Reproduce Steps
pnpm run dev
Reactions are currently unavailable
