3.1.0 • Published 3 years ago

@averjs/typescript v3.1.0

Weekly downloads
15
License
MIT
Repository
github
Last release
3 years ago

@averjs/typescript

Official aver package for typescript support.

Usage

Install the package

$ yarn add --dev @averjs/typescript
#or
$ npm i -D @averjs/typescript

Add the plugin to the buildPlugins array inside your aver-config.ts

export default {
  buildPlugins: [
    '@averjs/typescript'
  ]
}

Options

You can pass either one of the following options to the plugin

export default {
  buildPlugins: [
    [
      '@averjs/typescript',
      {
        tsLoader: {},
        // or
        tsLoader: (default) => ({ ...default, /* add additional config */ }),

        forkTsChecker: {},
        // or
        forkTsChecker: (default) => ({ ...default, /* add additional config */ }),
      }
    ]
  ]
}

tsLoader

  • Type: object | function
  • Default:
    {
      transpileOnly: true,
      happyPackMode: true,
      appendTsSuffixTo: [/\.vue$/]
    }

You can either pass an object with the loader options, which can be found here, or you can also use a function which is getting passed the default config, can be modified and should return a valid config.

forkTsChecker

  • Type: object | function
  • Default:
    {
      typescript: {
        configFile: path.resolve(process.env.PROJECT_PATH, '../tsconfig.json'),
        extensions: {
          vue: true
        }
      },
      formatter: 'codeframe',
      async: false,
      eslint: {
        files: [
          './src/**/*.vue',
          './src/**/*.ts'
        ]
      }
    }

You can either pass an object with the plugin options, which can be found here, or you can also use a function which is getting passed the default config, can be modified and should return a valid config.

3.1.0

3 years ago

3.0.0

3 years ago

3.0.0-7

3 years ago

3.0.0-6

3 years ago

3.0.0-5

3 years ago

3.0.0-3

3 years ago

3.0.0-4

3 years ago

3.0.0-2

3 years ago

2.6.1

3 years ago

2.6.0

3 years ago

2.6.3

3 years ago

2.6.2

3 years ago

3.0.0-1

3 years ago

3.0.0-0

3 years ago

2.5.2

3 years ago

2.5.1

3 years ago

2.5.0

3 years ago

2.4.7

3 years ago

2.4.6

3 years ago

2.4.3

3 years ago

2.4.5

3 years ago

2.4.4

3 years ago

2.4.1

3 years ago

2.4.0

3 years ago

2.4.2

3 years ago

2.3.4

4 years ago

2.3.3

4 years ago

2.3.2

4 years ago

2.3.0

4 years ago

2.3.1

4 years ago

2.2.1

4 years ago

2.2.0

4 years ago