Skip to content

Commit cb10ebf

Browse files
authored
docs(lib): show example entry file (#7233)
1 parent 6c08c86 commit cb10ebf

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

docs/guide/build.md

+9
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,15 @@ module.exports = defineConfig({
145145
})
146146
```
147147

148+
The entry file would contain exports that can be imported by users of your package:
149+
150+
```js
151+
// lib/main.js
152+
import Foo from './Foo.vue'
153+
import Bar from './Bar.vue'
154+
export { Foo, Bar }
155+
```
156+
148157
Running `vite build` with this config uses a Rollup preset that is oriented towards shipping libraries and produces two bundle formats: `es` and `umd` (configurable via `build.lib`):
149158

150159
```

0 commit comments

Comments
 (0)