[Build] use vue-cli to build site (#3734)

This commit is contained in:
neverland
2019-07-03 12:58:39 +08:00
committed by GitHub
parent 53e9468c2c
commit 66459df72a
30 changed files with 7776 additions and 1304 deletions

35
site/vue.config.js Normal file
View File

@@ -0,0 +1,35 @@
const path = require('path');
module.exports = {
publicPath: process.env.NODE_ENV === 'production' ? '/vant/' : '/',
pages: {
index: {
entry: 'src/desktop/main.js',
template: 'public/index.html',
filename: 'index.html'
},
mobile: {
entry: 'src/mobile/main.js',
template: 'public/index.html',
filename: 'mobile.html'
}
},
chainWebpack: config => config.resolve.extensions.prepend('.md'),
configureWebpack: {
module: {
rules: [
{
test: /\.md$/,
use: ['vue-loader', '@vant/markdown-loader']
}
]
}
},
css: {
loaderOptions: {
less: {
paths: [path.resolve(__dirname, '../node_modules')]
}
}
}
};