Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima committed Sep 20, 2024
1 parent 4e2c880 commit 1cbb587
Showing 1 changed file with 0 additions and 68 deletions.
68 changes: 0 additions & 68 deletions generators/vue/templates/vite.config.mts.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,10 @@ import { existsSync } from 'node:fs';
import { normalizePath } from 'vite'

import {
<%_ if (microfrontend) { _%>
mergeConfig,
<%_ } _%>
defineConfig,
} from 'vite';
import vue from '@vitejs/plugin-vue';
import { viteStaticCopy } from 'vite-plugin-static-copy';
<%_ if (microfrontend) { _%>
import federation from "@originjs/vite-plugin-federation";
<%_ if (applicationTypeGateway) { _%>
const sharedAppVersion = '0.0.0';
<%_ } _%>
<%_ } _%>

const getFileFromRepo = (file: string) =>
existsSync(fileURLToPath(new URL(`../node_modules/${file}`, import.meta.url)))
Expand Down Expand Up @@ -121,64 +111,6 @@ let config = defineConfig({
),
},
});

<%_ if (microfrontend) { _%>
config = mergeConfig(config, {
build: {
modulePreload: false,
minify: false,
target: ['chrome89', 'edge89', 'firefox89', 'safari15'],
},
plugins: [
federation({
name: '<%= lowercaseBaseName %>',
<%_ if (applicationTypeGateway) { _%>
remotes: {
<%_ for (const remote of microfrontends) { _%>
'@<%= remote.lowercaseBaseName %>': `/<%= remote.endpointPrefix %>/assets/remoteEntry.js`,
<%_ } _%>
},
<%_ } _%>
<%_ if (applicationTypeMicroservice) { _%>
exposes: {
'./entities-router': './<%= this.relativeDir(clientRootDir, clientSrcDir) %>app/router/entities',
'./entities-menu': './<%= this.relativeDir(clientRootDir, clientSrcDir) %>app/entities/entities-menu.vue',
},
<%_ } _%>
shared: {
'@vuelidate/core': {},
'@vuelidate/validators': {},
axios: {},
// 'bootstrap-vue': {},
vue: {
packagePath: '@vue/compat/dist/vue.esm-bundler.js',
},
'vue-i18n': {},
'vue-router': {},
pinia: {},
'@/shared/security/authority': {
packagePath: './<%= this.relativeDir(clientRootDir, clientSrcDir) %>app/shared/security/authority',
<%_ if (applicationTypeGateway) { _%>
version: sharedAppVersion,
<%_ } _%>
},
'@/shared/alert/alert.service': {
packagePath: './<%= this.relativeDir(clientRootDir, clientSrcDir) %>app/shared/alert/alert.service',
<%_ if (applicationTypeGateway) { _%>
version: sharedAppVersion,
<%_ } _%>
},
'@/locale/translation.service': {
packagePath: './<%= this.relativeDir(clientRootDir, clientSrcDir) %>app/locale/translation.service',
<%_ if (applicationTypeGateway) { _%>
version: sharedAppVersion,
<%_ } _%>
},
},
}),
],
});
<%_ } _%>
// jhipster-needle-add-vite-config - JHipster will add custom config

export default config;

0 comments on commit 1cbb587

Please sign in to comment.