![]() ![]() To continue developing an existing Vite application, open it in PhpStorm 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 PHP 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 PhpStorm project Npx create-vite to create an application. PhpStorm 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, PhpStorm 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 PhpStorm 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 PhpStorm downloads and runs for you using npx. Make sure the JavaScript and TypeScript and Vite required plugins are enabled on the Settings | Plugins page, tab Installed, see Managing plugins for details. 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. PhpStorm 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, PhpStorm can automatically detect the relevant configuration file for each module and use the module resolution rules from it, see Specifying the Vite configuration file to use below. PhpStorm 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. PhpStorm 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 |