Skip to content

Commit

Permalink
vue-cli
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima committed Mar 9, 2023
1 parent f893ccb commit b3bca13
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
2 changes: 1 addition & 1 deletion generators/vue/templates/vue.config.js.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const { defineConfig } = require('@vue/cli-service');

module.exports = defineConfig({
lintOnSave: true,
outputDir: './target/classes/static/',
outputDir: './<%= clientDistDir %>',
<%_ if (microfrontend) { _%>
publicPath: 'auto',
<%_ } _%>
Expand Down
26 changes: 11 additions & 15 deletions generators/vue/templates/webpack/webpack.common.js.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,6 @@ module.exports = async (configuration, options) => {
});

<%_ } _%>
const configFiles = [
__filename,
path.resolve(__dirname, './config.js'),
path.resolve(__dirname, '../.postcssrc.js'),
path.resolve(__dirname, '../tsconfig.json'),
path.resolve(__dirname, '../vue.commands.js'),
path.resolve(__dirname, '../vue.config.js'),
path.resolve(__dirname, '../package.json'),
path.resolve(__dirname, '../package-lock.json'),
];
if (configuration.mode == 'development') {
path.resolve(__dirname, 'webpack.dev.js');
}

return merge(
{
<%_ if (applicationTypeGateway && microfrontend) { _%>
Expand All @@ -75,7 +61,17 @@ module.exports = async (configuration, options) => {
cacheDirectory: resolve('<%= temporaryDir %>webpack'),
buildDependencies: {
// 2. Add your config as buildDependency to get cache invalidation on config change
config: configFiles,
config: [
__filename,
path.resolve(__dirname, './config.js'),
path.resolve(__dirname, '../.postcssrc.js'),
path.resolve(__dirname, '../tsconfig.json'),
path.resolve(__dirname, '../vue.commands.js'),
path.resolve(__dirname, '../vue.config.js'),
path.resolve(__dirname, '../package.json'),
path.resolve(__dirname, '../package-lock.json'),
...(configuration.mode == 'development' ? [path.resolve(__dirname, 'webpack.dev.js')] : []),
],
},
},
plugins: [
Expand Down

0 comments on commit b3bca13

Please sign in to comment.