Installing Vendor Plugins with npm
Follow these simple steps to install and use third-party plugins in your Silicon project:
-
Open your terminal and navigate to the root directory of your project
(where the
package.jsonfile is located). -
Install the desired package using npm:
npm install <package-name>
This command downloads the package into the
node_modulesdirectory and registers it insidepackage.json. - Import the plugin directly into your JavaScript or CSS files. Vite will automatically bundle and optimize it for development and production.
- Use the plugin in your HTML or JavaScript as needed. No manual file copying or vendor folder management is required.
Note: Vite handles dependency bundling, code splitting,
and optimization automatically, so there is no need for a separate
vendor command or folder.