@teip/loader

0.3.0 • Public • Published

Teip loader

Teip loader is an opinionated webpack loader that allows you to load and import .graphql files into your code. Teip loader creates ES modules by default but can also be configured to produce commonjs exports.

Usage

Include Teip loader into your Webpack configuration. If you are using Webpack 2 or newer you should be good to go without configuration. If you are using Webpack 1 you need to set esModules to false.

module.exports.config = {
  module: {
    rules: [
      {
        test: /\.(graphql|gql)$/,
        exclude: /node_modules/,
        loader: '@teip/loader',
      },
    ],
  },
};

Options

ES Modules

Use the esModules options flag to change the output files to commonjs modules format. This is only required if your platform does not support ES modules yet (e.g. when running Webpack 1 or using the results within Node.js).

Readme

Keywords

none

Package Sidebar

Install

npm i @teip/loader

Weekly Downloads

1

Version

0.3.0

License

MIT

Unpacked Size

7.96 kB

Total Files

5

Last publish

Collaborators

  • csnweb
  • hendrikniemann