Use vite as bundler
This commit is contained in:
parent
16dc5df9e5
commit
b6f7f75fdd
44 changed files with 4308 additions and 15961 deletions
|
|
@ -5,15 +5,13 @@ Vue.use(VueI18n)
|
|||
|
||||
var messages = {}
|
||||
|
||||
function importAll(r) {
|
||||
return r.keys().map(res => {
|
||||
// Remove"./"
|
||||
const parts = res.split("/");
|
||||
const locale = parts[1].split(".")[0];
|
||||
messages[locale] = r(res);
|
||||
});
|
||||
}
|
||||
importAll(require.context('@/assets/translations/', true, /\.json$/));
|
||||
const modules = import.meta.glob('@/assets/translations/*.json', {eager: true});
|
||||
Object.keys(modules).map(path => {
|
||||
// Remove"./"
|
||||
const parts = path.split("/");
|
||||
const locale = parts[parts.length - 1].split(".")[0];
|
||||
messages[locale] = modules[path];
|
||||
});
|
||||
|
||||
const vue18n = new VueI18n({
|
||||
locale: 'en',
|
||||
|
|
|
|||
2038
src/plugins/utils.js
2038
src/plugins/utils.js
File diff suppressed because it is too large
Load diff
|
|
@ -4,15 +4,14 @@ import Vuetify from 'vuetify/lib';
|
|||
// Import all .vue icons and process them, so they can be used
|
||||
// as $vuetify.icons.<iconname>
|
||||
var icons = {}
|
||||
function importAll(r) {
|
||||
return r.keys().map(res => {
|
||||
// Remove"./"
|
||||
const parts = res.split("/");
|
||||
const iconName = parts[1].split(".")[0];
|
||||
icons[iconName] = { component: r(res).default };
|
||||
});
|
||||
}
|
||||
importAll(require.context('@/assets/icons/', true, /\.vue$/));
|
||||
const modules = import.meta.glob('@/assets/icons/*.vue', {eager: true});
|
||||
Object.keys(modules).map(path => {
|
||||
// Remove"./"
|
||||
const parts = path.split("/");
|
||||
const iconName = parts[parts.length - 1].split(".")[0];
|
||||
icons[iconName] = { component: modules[path].default }
|
||||
});
|
||||
|
||||
|
||||
Vue.use(Vuetify);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue