Home Archives Categories Tags Docs

Vuejs 使用介绍

发布时间: 更新时间: 总字数:144 阅读时间:1m 作者: 分享

Vuejs 使用介绍

安装

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 插件,并开启