jherr / create-mf-app

CLI app to create Module Federation applications
MIT License
730 stars 84 forks source link

replacements not working for vue3 with ts #54

Closed paddomanno closed 1 year ago

paddomanno commented 1 year ago

Choosing these options leaves the replacements in the source code instead of replacing them.

This is the generated App.vue:

<template>
  <div class="{{CONTAINER}}">
    <div>Name: {{ NAME }}</div>
    <div>Framework: {{ FRAMEWORK }}</div>
    <div>Language: {{ LANGUAGE }}</div>
    <div>CSS: {{ CSS }}</div>
  </div>
</template>

<script lang="ts">
  import { defineComponent } from 'vue'

  export default defineComponent({});
</script>

Command and settings used:

> npx create-mf-app
? Pick the name of your app: name
? Project Type: Application
? Port number: 8080
? Framework: vue3
? Language: typescript
? CSS: CSS

This is in create-mf-app v1.0.18

souyang commented 1 year ago

I cannot reproduce this issue via create-mf-app v1.0.18 and follow the exact same steps. @paddomanno Did you try npm cache clean --force &&npx create-mf-app from your end? Are there any error logs?

Below is the generated code in App.vue from my end.

<template>
  <div class="container">
    <div>Name: name</div>
    <div>Framework: vue3</div>
    <div>Language: TypeScript</div>
    <div>CSS: Empty CSS</div>
  </div>
</template>

<script lang="ts">
  import { defineComponent } from 'vue'

  export default defineComponent({});
</script>
paddomanno commented 1 year ago

@souyang Seems like I cannot reproduce this issue either. I tried a couple of times (without npm cache clean) and it worked just fine. Maybe it was a one-off error. If it happens again, I will check the logs. For now I guess I can close the issue.