Subscribe on changes!

The sfc files packaged by rollup only work above 3.2.0

avatar
Aug 25th 2021

Version

3.2.6

Reproduction link

https://github.com/ckpack/v-ui-template#use-in-page

Steps to reproduce

<!DOCTYPE html>
<html lang="en">
<head>
  <title>VUI</title>
  <!-- it is ok -->
  <script src="https://unpkg.com/vue@3.2.0/dist/vue.global.prod.js"></script>
  <!-- it is error: console  t.normalizeClass is not a function -->
  <!--  <script src="https://unpkg.com/vue@3.1.5/dist/vue.global.prod.js"></script> -->
  <script src="https://unpkg.com/v-ui-template@1.0.3/dist/index.min.js"></script>
</head>
<body>
  <div id="app">
    <v-button @click="handlerClick">Test</v-button>
    <v-label :label="count"></v-label>
  </div>
</body>
<script>
  const app = Vue.createApp({
    data() {
      return {
        count: 0,
      };
    },
    methods: {
      handlerClick() {
        this.count  = 1;
      },
    },
  });
  app.use(VUI);
  app.mount('#app')
</script>
</html>

What is expected?

The sfc files packaged by rollup can work above 3.0.0

What is actually happening?

The sfc files packaged by rollup only work above 3.2.0

avatar
Aug 25th 2021

This is expected and has been discussed already: SFC compiled with 3.2.x are compatible with ^3.2x (3.2, 3.3, 3.4, etc). Use peerdependencies to make the minimum required version to be ^3.2.0

It would be otherwise impossible to bring improvements to templates (and sometimes even some bug fixes)