-
Notifications
You must be signed in to change notification settings - Fork 3
/
rslib.config.ts
43 lines (42 loc) · 1.22 KB
/
rslib.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import { pluginReact } from '@rsbuild/plugin-react';
import { pluginSass } from '@rsbuild/plugin-sass';
import { defineConfig } from '@rslib/core';
export default defineConfig({
plugins: [pluginReact(), pluginSass()],
lib: [
{
format: 'esm',
syntax: 'es2015',
autoExternal: false,
banner: {
js: `import './index.css';`,
},
dts: true,
source: {
entry: {
'nav-icon': './src/nav-icon/index.tsx',
benchmark: './src/benchmark/index.tsx',
'tool-stack': './src/tool-stack/index.tsx',
hero: './src/hero/index.tsx',
'section-style': './src/section-style/index.tsx',
'fully-featured': './src/fully-featured/index.tsx',
'built-with-rspack': './src/built-with-rspack/index.tsx',
'why-rspack': './src/why-rspack/index.tsx',
'background-image': './src/background-image/index.tsx',
announcement: './src/announcement/index.tsx',
},
},
},
],
output: {
target: 'web',
externals: ['react', 'react-dom', 'react/jsx-runtime', 'framer-motion'],
filename: {
js: '[name]/index.js',
css: '[name]/index.css',
},
distPath: {
css: '',
},
},
});