Vuejs 使用介绍

发布时间: 更新时间: 总字数:190 阅读时间:1m 作者: IP上海 分享 网址

Vuejs 使用介绍

安装

npm i -g @vue/cli

创建项目

vue create <name>
cd <name>
npm run serve

运行

npm install
npm run build
npm run dev

插件

开发插件 vue-devtools

https://github.com/vuejs/vue-devtools

clean-webpack-plugin

Installation, in webpack project home dir:

npm install --save-dev clean-webpack-plugin

Usage, add to webpack.config.js:

const CleanWebpackPlugin = require('clean-webpack-plugin');

const webpackConfig = {
    plugins: [
        /**
         * All files inside webpack's output.path directory will be removed once, but the
         * directory itself will not be. If using webpack 4+'s default configuration,
         * everything under <PROJECT_DIR>/dist/ will be removed.
         * Use cleanOnceBeforeBuildPatterns to override this behavior.
         *
         * During rebuilds, all webpack assets that are not used anymore
         * will be removed automatically.
         *
         * See `Options and Defaults` for for information
         */
        new CleanWebpackPlugin(),
    ],
};

module.exports = webpackConfig;

ref: https://github.com/johnagan/clean-webpack-plugin

问题

跨域问题

chrome 安装 Moesif Orign & CORS Changer 插件,并开启

?raw 什么作用

  • 将改变任何类型文件的字符串导入(参考
import richtextRedo from '../assets/richtext_redo.svg?raw';
Home Archives Categories Tags Statistics
本文总阅读量 次 本站总访问量 次 本站总访客数