How to use the babel-plugin-import-graphql.default function in babel-plugin-import-graphql

To help you get started, we’ve selected a few babel-plugin-import-graphql examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github commercetools / merchant-center-application-kit / rollup.config.js View on Github external
const createPlugins = format => {
  const isFormatEs = format === 'es';
  return [
    peerDeps({
      includeDependencies: true,
    }),
    babel({
      extensions,
      runtimeHelpers: true,
      ...babelOptions,
      plugins: [
        babelPluginImportGraphQL.default,
        ...babelOptions.plugins,
        'babel-plugin-typescript-to-proptypes',
        isFormatEs && [
          'transform-rename-import',
          {
            replacements: [{ original: 'lodash', replacement: 'lodash-es' }],
          },
        ],
      ].filter(Boolean),
    }),
    // To convert CJS modules to ES6
    commonjs({
      include: 'node_modules/**',
    }),
    resolve({
      extensions,

babel-plugin-import-graphql

Babel plugin to make .gql/.graphql files importable

MIT
Latest version published 4 years ago

Package Health Score

60 / 100
Full package analysis

Popular babel-plugin-import-graphql functions