Level 58
Yes, Vite can do this as well. You can use the rollup-plugin-vue plugin to combine your custom js files. Here is an example of how you can do this:
import vue from 'rollup-plugin-vue';
export default {
input: [
'resources/js/file1.js',
'resources/js/file2.js',
'resources/js/file3.js'
],
output: {
file: 'public/js/specific-page/specific-page.js',
format: 'esm'
},
plugins: [
vue()
]
};
You can find more information about the rollup-plugin-vue plugin here: https://github.com/vuejs/rollup-plugin-vue