mirror of
https://github.com/youzan/vant.git
synced 2025-10-18 01:17:15 +00:00
[Build] use vue-cli to build site (#3734)
This commit is contained in:
35
site/vue.config.js
Normal file
35
site/vue.config.js
Normal 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')]
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user