4
4
5
5
<div align =" center " >
6
6
7
- ![ ] ( https://i.imgur.com/whutZeK.png )
7
+ ![ screenshot ] ( https://i.imgur.com/whutZeK.png )
8
8
9
9
</div >
10
10
@@ -23,6 +23,8 @@ some of those gaps. 🚀
23
23
24
24
![ npm] ( https://img.shields.io/static/v1?style=for-the-badge&message=npm&color=CB3837&logo=npm&logoColor=FFFFFF&label= )
25
25
26
+ > From v4, ` vite-plugin-no-bundle ` requires ** Vite 5** .
27
+
26
28
This plugin is designed to work with Vite in a development environment using
27
29
Node.js. You can install this package using npm, [ Yarn] , or [ pnpm] using a
28
30
command similar to this example for npm:
@@ -57,7 +59,7 @@ export default defineConfig({
57
59
58
60
Here's an example project tree using ☝ the example ` vite.config.ts ` from above:
59
61
60
- ```
62
+ ``` text
61
63
.
62
64
├── dist/
63
65
│ ├── index.js
@@ -99,7 +101,7 @@ interface VitePluginNoBundleOptions {
99
101
100
102
- ** ` internal ` :** One or more [ globs] for matching files that should ** not** be
101
103
automatically marked as external. This can be used to tell the plugin to
102
- ** not** handle certain files and leave them up to other plugins & resolvers.
104
+ ** not** handle certain files and leave them up to other plugins and resolvers.
103
105
104
106
- ** ` root ` :** Exposes [ ` output.preserveModulesRoot ` ] , which controls which part
105
107
of the full path to exclude when putting files into the ` dist/ ` folder. Make
@@ -143,12 +145,16 @@ Another good use-case is serving individual files via an HTTP server. Sometimes
143
145
you just want a plain TS ➡️ JS file conversion (with some extra features). This
144
146
plugin lets you do just that, no magic required. 🧙♂️
145
147
148
+ 📂 ** [ Browse Sample Configurations] ( ./samples ) ** - For practical examples,
149
+ explore the ` samples ` folder.
150
+
146
151
## Development
147
152
148
153
![ TypeScript] ( https://img.shields.io/static/v1?style=for-the-badge&message=TypeScript&color=3178C6&logo=TypeScript&logoColor=FFFFFF&label= )
149
154
150
155
This is a fairly basic Vite plugin. The only compilation step is to run
151
- ` npm run build ` which uses [ tsup] .
156
+ ` npm run build ` which uses [ tsup] . Sample configurations serve as test
157
+ cases for different plugin scenarios and can be run using ` npm test ` .
152
158
153
159
If you're interested in learning more about Vite plugins and how they work,
154
160
check out the [ Plugin API | Vite] page!
@@ -161,7 +167,6 @@ check out the [Plugin API | Vite] page!
161
167
[ vitejs/vite#4454 ] : https://github.com/vitejs/vite/issues/4454
162
168
[ tsup ] : https://github.com/egoist/tsup#readme
163
169
[ Plugin API | Vite ] : https://vitejs.dev/guide/api-plugin.html
164
- [ @ManBearTM ] : https://github.com/ManBearTM
165
170
[ yarn ] : https://yarnpkg.com/
166
171
[ pnpm ] : https://pnpm.io/
167
172
<!-- prettier-ignore-end -->
0 commit comments