vue-frag icon indicating copy to clipboard operation
vue-frag copied to clipboard

fix: FragmentComponent types when setting up as a plugin

Open wobsoriano opened this issue 2 years ago • 5 comments

Fixes https://github.com/privatenumber/vue-frag/issues/63

wobsoriano avatar May 01 '22 20:05 wobsoriano

2nd commit fixes eslint having problems finding Fragment on named imports

Screen Shot 2022-05-01 at 1 15 12 PM

wobsoriano avatar May 01 '22 20:05 wobsoriano

Thanks for the PR!

I'm curious if this is compatible with the CJS export (or if it even needs to be). Will look into adding type tests with tsd later.

privatenumber avatar May 01 '22 23:05 privatenumber

The second commit is breaking the CJS export.

Can you elaborate on what you're trying to fix? And can you share your tsconfig?

privatenumber avatar May 02 '22 20:05 privatenumber

Not sure what the content of that config is but happy to approve the first commit.

Here's the tsconfig

{
  "compilerOptions": {
    "target": "ES2018",
    "module": "ESNext",
    "moduleResolution": "Node",
    "lib": ["ESNext", "ESNext.AsyncIterable", "DOM"],
    "esModuleInterop": true,
    "allowJs": true,
    "sourceMap": true,
    "strict": true,
    "noEmit": true,
    "experimentalDecorators": true,
    "baseUrl": ".",
    "paths": {
      "~/*": ["./*"],
      "@/*": ["./*"]
    },
    "types": ["@nuxt/types", "@types/node"]
  },
  "exclude": ["node_modules", ".nuxt", "dist"]
}

and .eslintrc

module.exports = {
  root: true,
  env: {
    browser: true,
    node: true,
  },
  extends: [
    '@nuxtjs/eslint-config-typescript',
    'plugin:nuxt/recommended',
    'prettier',
  ],
  plugins: [],
  // add your custom rules here
  rules: {},
}

wobsoriano avatar May 02 '22 22:05 wobsoriano

Not sure what the content of that config is but happy to approve the first commit.

privatenumber avatar May 02 '22 22:05 privatenumber

:tada: This PR is included in version 1.4.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

privatenumber avatar Nov 17 '22 15:11 privatenumber