Skip to content

Question on how to configure transpilation for vue-cli #81

@commonpike

Description

@commonpike

This is already in the README, but still confusing for me. So I guess this is a documentation issue.

https://github.com/greenpress/vuex-composition-helpers?tab=readme-ov-file#transpiling

That documentation was added after #13

Using vue-cli, with vue-tsc, this example gives an error

// vue.config.js
module.exports = {
  ...
  chainWebpack: config => {
    config
      .rule('ts') // < --- rule('ts') doesnt exist
      .include
      .add(/vuex-composition-helpers/)
  }
}

If I use config.module.rule("ts") (which. exists), it seems like I'm overwriting a lot of logic that was already in that rule - none of my typescript compiles anymore. Not sure if I interpret that right.

I've added

// vue.config.js
module.exports = {
  ...
  transpileDependencies: ['vuex-composition-helpers'],
}

everything seems to work fine without these additions, and I'm not sure what they're supposed to do, and if I'm supposed to do anything more :-)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions