@compile-this/rollup-plugin-graphql
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

@compile-this/rollup-plugin-graphql

npm size

A Rollup plugin to convert GraphQL type definitions to ES Modules.

Requirements

This plugin requires an LTS Node version (v12.0.0+) and Rollup v2.10.9+.

Install

Using npm:

npm install @compile-this/rollup-plugin-graphql --save-dev

Usage

Create a rollup.config.js configuration file and import the plugin:

import graphql from '@compile-this/rollup-plugin-graphql';

export default {
  input: 'src/index.js',
  output: {
    dir: 'output',
    format: 'cjs'
  },
  plugins: [graphql()]
};

Then call rollup either via the CLI or the API.

Options

exclude

Type: String | Array[...String]
Default: null

A minimatch pattern, or array of patterns, which specifies the files in the build the plugin should ignore.

include

Type: String | Array[...String]
Default: null

A minimatch pattern, or array of patterns, which specifies the files in the build the plugin should operate on.

extensions

Type: Array[...String]
Default: ['.graphql', '.gql']

The set of file extensions in the build which the plugin should treat as GraphQL type definitions.

License

LICENSE (MIT)

Readme

Keywords

none

Package Sidebar

Install

npm i @compile-this/rollup-plugin-graphql

Weekly Downloads

1

Version

0.1.1

License

none

Unpacked Size

14 kB

Total Files

16

Last publish

Collaborators

  • compilethis