项目作者: wytheking

项目描述 :
用 Vue 做的 CNode 官网
高级语言: Vue
项目地址: git://github.com/wytheking/vue-conde.git
创建时间: 2018-10-12T06:40:33Z
项目社区:https://github.com/wytheking/vue-conde

开源协议:

下载


cnode

A Vue.js project

Build Setup

  1. # install dependencies
  2. npm install
  3. # serve with hot reload at localhost:8080
  4. npm run dev
  5. # build for production with minification
  6. npm run build
  7. # build for production and view the bundle analyzer report
  8. npm run build --report
  9. # run e2e tests
  10. npm run e2e
  11. # run all tests
  12. npm test

For a detailed explanation on how things work, check out the guide and docs for vue-loader.

在vue-cli构建的vue工程中使用jquery需要设置webpack,具体操作方法如下:
1:首先安装jquery
npm install jquery —save

2:在webpack.base.conf.js里加入
var webpack = require(“webpack”)

3:在module.exports的最后加入
plugins: [
new webpack.optimize.CommonsChunkPlugin(‘common.js’),
new webpack.ProvidePlugin({
jQuery: “jquery”,
$: “jquery”,
“window.jQuery”:”jquery” // 配置全局
})
]

4:在main.js中引入
import $ from ‘jquery’

5.最后 npm run dev就可以了