Open the application sources that are already on your machineĬlick Open on the Welcome screen or select File | Open from the main menu. To continue developing an existing Vite application, open it in WebStorm and download the required dependencies. In the embedded Terminal ( Alt+F12), type: Open the empty project where you will use Vite. In the right-hand pane, specify the application folder and click Create. In the left-hand pane, choose Empty Project. Learn more about adding Vite to a project from the Vite official website. In this case, you will have to configure the build pipeline yourself. Install Vite in an empty WebStorm project Npx create-vite to create an application. WebStorm also creates an npm start and JavaScript Debug configurations with default settings for running or debugging your application.Īlternatively, open the built-in Terminal and type: When you click Create, WebStorm generates a Vite-specific project with all the required configuration files and downloads the required dependencies. ts files for your application and a tsconfig.json configuration file. To use TypeScript instead of JavaScript, select the Use TypeScript template checkbox. When creating an application, select the folder where the create-vite package is stored.įrom the Template list, select the community maintained Vite template that targets the framework you are going to use in your application. Select a configured interpreter from the list or choose Add to configure a new one.įrom the Vite list, select npx create-vite.Īlternatively, for npm version 5.1 and earlier, install the create-vite package yourself by running npm install -g create-vite in the Terminal Alt+F12. In the Node Interpreter field, specify the Node.js interpreter to use. Specify The path to the folder where the project-related files will be stored. Generate a Vite application with create-viteĬlick Create New Project on the Welcome screen or select File | New | Project from the main menu. Learn more about starting with Vite from the Vite.js official website. Of course, you can still download create-vite yourself or create an empty WebStorm project and install Vite in it. As a result, your development environment is preconfigured to use Vite and a basic template for one of the popular frameworks. The recommended way to start a new Vite application is the create-vite package, which WebStorm downloads and runs for you using npx. For more information about plugins, refer to Managing plugins. Press Control+Alt+S to open the IDE settings and then select Plugins. Make sure the Vite plugin is enabled in the settings. Make sure you have Node.js on your computer. To work with an existing Vite app, make sure your package.json lists Vite before running npm install. Therefore, either create an application with create-vite or install the vite package manually. WebStorm integration with Vite requires that the vite package should be installed in your project or globally. In projects that consist of multiple modules with different Vite configurations, WebStorm can automatically detect the relevant configuration file for each module and use the module resolution rules from it, refer to Specifying the Vite configuration file to use below. WebStorm supports tsconfig.json and jsconfig.json path mappings in Vue style tags and recognizes Vite aliases. The build command bundles your code with Rollup, which is pre-configured to output highly optimized static assets for production. The build server serves your source files over native ES modules. Vite consists of a dev server and a build command. WebStorm integrates with the Vite build tool that improves the frontend development experience.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |