| 
									
										
										
										
											2022-11-11 11:02:51 +08:00
										 |  |  | # @ice/plugin-jsx-plus
 | 
					
						
							| 
									
										
										
										
											2022-09-16 14:45:22 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-11-11 11:02:51 +08:00
										 |  |  | This plugin adds support for JSX+ syntax to the ice.js. | 
					
						
							| 
									
										
										
										
											2022-09-16 14:45:22 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | ## Definition of JSX Plus
 | 
					
						
							| 
									
										
										
										
											2022-11-11 11:02:51 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-09-16 14:45:22 +08:00
										 |  |  | https://github.com/jsx-plus/jsx-plus | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ## Usage
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ```js | 
					
						
							|  |  |  | import { defineConfig } from '@ice/app'; | 
					
						
							|  |  |  | import jsxplus from '@ice/plugin-jsx-plus'; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-11-11 11:02:51 +08:00
										 |  |  | export default defineConfig(() => ({ | 
					
						
							| 
									
										
										
										
											2022-09-16 14:45:22 +08:00
										 |  |  |   plugins: [ | 
					
						
							|  |  |  |     jsxplus({ | 
					
						
							|  |  |  |       // options | 
					
						
							|  |  |  |     }), | 
					
						
							|  |  |  |   ], | 
					
						
							| 
									
										
										
										
											2022-11-11 11:02:51 +08:00
										 |  |  | })); | 
					
						
							| 
									
										
										
										
											2022-09-16 14:45:22 +08:00
										 |  |  | ``` | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ## Options
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | - `include`: `(string | RegExp)[]` | 
					
						
							|  |  |  |   - Files to be included. | 
					
						
							|  |  |  |   - Default: the project `src` directory. | 
					
						
							|  |  |  | - `exclude`: `(string | RegExp)[]` | 
					
						
							|  |  |  |   - Files to be excluded. | 
					
						
							|  |  |  |   - Default: `[]` | 
					
						
							|  |  |  | - `extensions`: `string[]` | 
					
						
							|  |  |  |   - File extensions to be processed. | 
					
						
							|  |  |  |   - Default: `['.jsx', '.tsx']` | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | > If `include` and `exclude` are both set, `exclude` will be priority executed.
 |