Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spring boot Admin release 3.0.0M8 -My vue3 seems not work #2219

Closed
georgerocha opened this issue Jan 12, 2023 · 3 comments
Closed

Spring boot Admin release 3.0.0M8 -My vue3 seems not work #2219

georgerocha opened this issue Jan 12, 2023 · 3 comments

Comments

@georgerocha
Copy link

georgerocha commented Jan 12, 2023

Hello
Im new at SBA and Vue.
Everything is fine until I create some custom views.
I´m able to do that but If I put some code..it didn´t work..
for example v-for...v-if...and etc seems not work.

Please, help me.

my configuration

<spring-boot-admin.version>3.0.0-M8</spring-boot-admin.version>
...


    <node.version>v16.18.0</node.version>

    <npm.version>8.3.2</npm.version>

my package

  "devDependencies": {
    "@vue/cli-service": "4.5.19",
    "copy-webpack-plugin": "5.1.2",
    "sass": "^1.57.1",
    "sass-loader": "^10.1.1",
    "vue": "3.2.45",
    "vue-loader": "17.0.0"
  },
  "peerDependencies": {
    "vue": "3.2.45"
  },
  "overrides": {
    "trim-newlines": "^1.0.0"
  },
  "browserslist": [
    "> 1%",
    "last 2 versions",
    "not ie <= 8"
  ],
  "dependencies": {
    "vue-good-table": "^2.21.11"
  }

my vue config

const {resolve} = require('path');
const CopyPlugin = require('copy-webpack-plugin');
module.exports = {
  outputDir: 'target/dist',
  chainWebpack: config => {
    config.entryPoints.delete('app');
    config.entry('custom').add('./src/index.js');
    if (process.env.NODE_ENV === 'development') {
      //Fix different paths for watch-mode
      config.output.filename('js/[name].js');
      config.output.chunkFilename('js/[name].js');
    }
    config.output.libraryTarget('var');
    config.optimization.splitChunks(false);
    config.module
      .rule('vue')
      .use('vue-loader')
      .loader('vue-loader')
      .tap(options => ({
        ...options,
        hotReload: false
      }));
    config.plugins.delete('html');
    config.plugins.delete('preload');
    config.plugins.delete('prefetch');
  },
  configureWebpack: {
    plugins: [
     new CopyPlugin([{
        from: resolve(__dirname, 'src/routes.txt'),
        to: resolve(__dirname, 'target/dist'),
        toType: 'dir',
        ignore: ['*.scss']
      }])
    ],
    resolve: {
      alias: {
        'Vue': "vue/dist/vue.runtime.esm.js",
      },
      extensions: ["*", ".js", ".vue", ".json"],
    },
  },

};

@erikpetzold
Copy link
Member

Hi @georgerocha

can you please provide a repo with a sample project?

Regards

@georgerocha
Copy link
Author

Sorry but I cant.
Just based on what I sent to u..I could not see the result of a simple code like this

<script> export default { data() { return { awesome: true } }, mounted() { console.log('VIVA'); } } </script> toggle
<h1 v-if="awesome">Vue is awesome!</h1>
<h1 v-else>Oh no 😢</h1>

The page remains blank and No errors

@erikpetzold
Copy link
Member

Hi @georgerocha

sounds like you are having issues with vue, not Spring Boot Admin. Please ask your vue question somewhere else where more people with vue experience can help you. Some vue or javascript community or maybe stackoverflow.

Kind regards

SteKoe added a commit that referenced this issue Mar 5, 2023
SteKoe added a commit that referenced this issue Mar 10, 2023
* fix: custom-uis do not work as expected

closes #2304, #2255, #2221, #2219

* add documentation

* copy routes.txt file to target directory to include custom routes in HomepageForwardingFilter

* remove console.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants