Repository URL to install this package:
|
Version:
3.3.0 ▾
|
import { Configuration, Options } from '../typings'
/**
* @todo replace with
* https://github.com/gajus/babel-plugin-graphql-tag
*/
export default function graphqlPlugin(config: Configuration, options: Options) {
// @note would need to use both this and raw, bah
const graphlSchemaLoader = {
test: /\.(graphql|gql)$/,
exclude: /node_modules/,
// loader: require.resolve('graphql-tag/loader'),
// loader: 'graphql-import-loader'
// loader: require.resolve('./gql/loader'),
loader: require.resolve('@skava/webpack-loader-graphql/loader.js'),
}
config.module.rules.push(graphlSchemaLoader)
// const raw = {
// test: /\.graphql$/,
// loader: 'raw-loader'
// }
// config.module.rules.push(raw)
}