Files
FossFLOW/packages/fossflow-lib/rslib.config.ts
Stan 45d91ec315 build: migrate fossflow-lib from webpack to rslib
- Replace webpack + babel with rslib (Rspack-based library builder)
- Remove 122 packages (webpack, babel-loader, etc.)
- Build time reduced from minutes to ~0.7 seconds
- Remove redundant CSS import in app (quill CSS was imported twice)
2026-01-14 06:39:56 +00:00

48 lines
969 B
TypeScript

import { defineConfig } from '@rslib/core';
import { pluginReact } from '@rsbuild/plugin-react';
const packageJson = require('./package.json');
export default defineConfig({
lib: [
{
format: 'cjs',
syntax: 'es2021',
output: {
distPath: { root: './dist' },
},
style: {
inject: false,
},
},
],
plugins: [pluginReact()],
source: {
entry: {
index: './src/index.ts',
},
define: {
PACKAGE_VERSION: JSON.stringify(packageJson.version),
REPOSITORY_URL: JSON.stringify(packageJson.repository.url),
},
},
resolve: {
alias: {
src: './src',
components: './src/components',
stores: './src/stores',
styles: './src/styles',
utils: './src/utils',
hooks: './src/hooks',
types: './src/types',
},
},
output: {
externals: ['react', 'react-dom'],
target: 'node',
filename: {
css: 'styles.css',
},
},
});