How to deploy Vuexy Admin

Getting Things Ready

Before deploying Vuexy Admin, make sure you have all the required modules/packages installed. Missing modules/packages may result in error during the build process.
部署Vuexy Admin之前,请确保已安装所有必需的模块/软件包。缺少的模块/软件包可能会在构建过程中导致错误。

Now to create build run command npm run build. After successful execution of build command you will get dist folder in root of your project. Now Your files are ready to be deployed.
现在创建构建运行命令npm run build。成功执行build命令后,您将在项目根目录中找到dist文件夹。现在,您的文件已准备好进行部署。

Deploying

Create zip file of your dist folder to upload it on server. Login into your server, upload your zip file and decompress it.
创建dist文件夹的zip文件以将其上传到服务器。登录到您的服务器,上传您的zip文件并解压缩。

WARNING If you plan to deploy your site under a sub path, e.g. [https://foo.github.io/bar/](https://foo.github.io/bar/) then in vue.config.js file set publicPath property to your sub path. e.g. publicPath: 'bar/' 如果您打算将站点部署在子路径下,例如https://foo.github.io/bar/,然后在vue.config.js文件中将publicPath属性设置为您的子路径。例如publicPath:’bar /‘

Last step is to add .htaccess file to root of your project. Code for .htaccess file is as below:
最后一步是将.htaccess文件添加到项目的根目录。 .htaccess文件的代码如下:

  1. Options -MultiViews
  2. RewriteEngine On
  3. RewriteCond %{REQUEST_FILENAME} !-f
  4. RewriteRule ^ index.html [QSA,L]