基于vue+vue-router+vuex+axios构建的单页面的燃气公司官网项目
1.ui框架使用了vue-element
Build Setup
# install dependencies --- 安装项目依赖
sudo cnpm install
# serve with hot reload at localhost:8081 -- 可以在config/index.js中修改
npm run dev
dev: {
env: require('./dev.env'),
port: 8081,
autoOpenBrowser: true,
assetsSubDirectory: 'static',
assetsPublicPath: '/',
proxyTable: {
'/api': {
target: 'http://website-web-qa.eslink.net.cn',
// target: 'http://10.101.0.136:28101/website-controller',
changeOrigin: true,
pathRewrite: {
'^/api': ''
}
}
}
# build for production with minification -- 打生产包
npm run build
# build for production and view the bundle analyzer report
npm run build --report
For detailed explanation on how things work, checkout the guide and docs for vue-loader.