Skip to content

Commit

Permalink
feat: Allow adding script arguments
Browse files Browse the repository at this point in the history
fix: Remove annoying logs in middleware (.NET 8 only)
refactor: Remove Vite.AspnetCore.Abstractions package
  • Loading branch information
Eptagone committed Nov 10, 2024
1 parent a02e464 commit 291d429
Show file tree
Hide file tree
Showing 38 changed files with 3,441 additions and 1,384 deletions.
27 changes: 14 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,19 +238,20 @@ If you prefer not to hardcode the options, you can use environment variables or

There are more options that you can change. All the available options are listed below. ⚙️

| Property | Description |
| ------------------------- | ------------------------------------------------------------------------------------------------------------ |
| `Manifest` | The manifest file name. Default is `.vite/manifest.json` (Vite 5) or `manifest.json` (Vite 4). |
| `Base` | The subfolder where your assets will be located, including the manifest file, relative to the web root path. |
| `Server:Port` | The port where the Vite Development Server will be running. Default value is `5173`. |
| `Server:Host` | The host where the Vite Dev Server will be running. Default value is `localhost`. |
| `Server:TimeOut` | The timeout in seconds spent waiting for the vite dev server. Default is `5` |
| `Server:Https` | Set true, if you are using HTTPS to connect to the Vite Development Server. Default value is `false`. |
| `Server:UseReactRefresh` | If true, the react-refresh script will be injected before the vite client. |
| `Server:AutoRun` | Enable or disable the automatic start of the Vite Dev Server. Default value is `false`. |
| `Server:PackageManager` | The name of the package manager to use. Default value is `npm`. |
| `Server:PackageDirectory` | The directory where the package.json file is located. Default value is the .NET project working directory. |
| `Server:ScriptName` | The script name to run the Vite Development Server. Default value is `dev`. |
| Property | Description |
| ------------------------- | -------------------------------------------------------------------------------------------------------------------- |
| `Manifest` | The manifest file name. Default is `.vite/manifest.json` (Vite 5) or `manifest.json` (Vite 4). |
| `Base` | The subfolder where your assets will be located, including the manifest file, relative to the web root path. |
| `Server:Port` | The port where the Vite Development Server will be running according to your configuration. Default value is `5173`. |
| `Server:Host` | The host where the Vite Dev Server will be running according to your configuration. Default value is `localhost`. |
| `Server:TimeOut` | The timeout in seconds spent waiting for the vite dev server. Default is `5` |
| `Server:Https` | Set true, if you are using HTTPS to connect to the Vite Development Server. Default value is `false`. |
| `Server:UseReactRefresh` | If true, the react-refresh script will be injected before the vite client. |
| `Server:AutoRun` | Enable or disable the automatic start of the Vite Dev Server. Default value is `false`. |
| `Server:PackageManager` | The name of the package manager to use. Default value is `npm`. |
| `Server:PackageDirectory` | The directory where the package.json file is located. Default value is the .NET project working directory. |
| `Server:ScriptName` | The script name to run the Vite Development Server. Default value is `dev`. |
| `Server:ScriptArgs` | If specified, the script will be run with the specified arguments. Example: `npm run dev -- [ARGS]` |

> If you are using the `appsettings.json` and/or `appsettings.Development.json` files, all the options must be under the `Vite` property.
Expand Down
330 changes: 182 additions & 148 deletions examples/libraries/ViteNET.React/package-lock.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions examples/libraries/ViteNET.React/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
"build": "tsc && vite build"
},
"devDependencies": {
"@types/react": "^18.3.8",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react-swc": "^3.7.0",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@vitejs/plugin-react-swc": "^3.7.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"typescript": "^5.6.2",
"vite": "^5.4.7"
"typescript": "^5.6.3",
"vite": "^5.4.10"
}
}
9 changes: 8 additions & 1 deletion examples/libraries/ViteNET.React/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,14 @@ export default defineConfig(async () => {
],
optimizeDeps: {
include: []
}
},
css: {
preprocessorOptions: {
scss: {
api: "modern-compiler",
},
},
},
}

return config;
Expand Down
Loading

0 comments on commit 291d429

Please sign in to comment.