mirror of
https://github.com/stan-smith/FossFLOW.git
synced 2026-04-23 08:31:16 -04:00
- 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)
48 lines
969 B
TypeScript
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',
|
|
},
|
|
},
|
|
});
|