Forked from EdwardMillen/scripts section of package.json
Created
January 17, 2025 14:37
-
-
Save DarkVss/a6f3a98b079460af32c1fd70a247cb73 to your computer and use it in GitHub Desktop.
Sample Split Vue Config Files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"scripts": { | |
"serve": "vue-cli-service serve", | |
"build:client": "env VUE_CLI_SERVICE_CONFIG_PATH=\"**Insert full path to vue.configClient.js**\" vue-cli-service build", | |
"build:admin": "env VUE_CLI_SERVICE_CONFIG_PATH=\"**Insert full path to vue.configAdmin.js**\" vue-cli-service build", | |
"build:all": "npm run build:client && npm run build:admin", | |
"lint": "vue-cli-service lint" | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require('path') | |
module.exports = { | |
outputDir: 'dist/admin', | |
pages: { | |
admin: { | |
entry: 'src/admin/main.js', | |
template: 'public/index.html', | |
filename: 'index.html', | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require('path') | |
module.exports = { | |
outputDir: 'dist/client', | |
pages: { | |
index: { | |
entry: 'src/client/main.js', | |
template: 'public/index.html', | |
filename: 'index.html', | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require('path') | |
module.exports = { | |
pages: { | |
index: { | |
entry: 'src/client/main.js', | |
template: 'public/index.html', | |
filename: 'index.html', | |
}, | |
admin: { | |
entry: 'src/admin/main.js', | |
template: 'public/index.html', | |
filename: 'admin.html', | |
} | |
}, | |
devServer: { | |
port: 8080, | |
historyApiFallback: { | |
rewrites: [ | |
{ from: /^\/admin\/?.*/, to: path.posix.join('/', 'admin.html') }, | |
{ from: /./, to: path.posix.join('/', 'index.html') } | |
] | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment