Skip to content

Instantly share code, notes, and snippets.

@ejlofgren
Last active December 14, 2021 11:43
Show Gist options
  • Save ejlofgren/0f8368b5c0a74ebc94604558303a73e7 to your computer and use it in GitHub Desktop.
Save ejlofgren/0f8368b5c0a74ebc94604558303a73e7 to your computer and use it in GitHub Desktop.
Sample Split Vue Config Files
"scripts": {
"serve": "vue-cli-service serve",
"buildAdmin": "vue-cli-service build --dest dist/admin src/entries/admin_app_entry.js",
"buildMain": "vue-cli-service build --dest dist/public src/entries/main_app_entry.js",
"lint": "vue-cli-service lint"
},
// vue.adminConfig.js
module.exports = {
devServer: {
useLocalIp: false,
proxy: 'http://localhost:8080'
},
pages: {
admin: {
entry: 'src/entries/admin_app_entry.js',
template: 'public/admin.html',
filename: 'admin.html',
}
},
}
// vue.mainConfig.js
module.exports = {
devServer: {
useLocalIp: false,
proxy: 'http://localhost:8080'
},
pages: {
index: {
entry: 'src/entries/main_app_entry.js',
template: 'public/index.html',
filename: 'index.html',
}
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment