在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):samsarahq/graphql-loader开源软件地址(OpenSource Url):https://github.com/samsarahq/graphql-loader开源编程语言(OpenSource Language):TypeScript 98.5%开源软件介绍(OpenSource Introduction):GraphQL Loader for WebpackA webpack loader for Installationyarn add --dev webpack-graphql-loader # or npm install --save-dev webpack-graphql-loader You will also need to install a copy of yarn add --dev graphql # or npm install --save-dev graphql ConfigurationAdd module.exports = {
// ...
module: {
rules: [ // or "loaders" for webpack 1.x
{ test: /\.graphql?$/, loader: 'webpack-graphql-loader' }
]
}
} Specifying optionsYou can also pass options to the loader via webpack options: module.exports = {
// ...
module: {
rules: [ // or "loaders" for webpack 1.x
{
test: /\.graphql?$/,
use: [
{
loader: 'webpack-graphql-loader',
options: {
// validate: true,
// schema: "./path/to/schema.json",
// removeUnusedFragments: true
// etc. See "Loader Options" below
}
}
]
}
]
}
} Loader Optionsschema (string) (default="")The location of your graphql introspection query schema JSON file. If used with the validate (boolean) (default=false)If output ("string" | "document") (default="string")Specifies whether or not the imported document should be a printed graphql string, or a graphql minify (boolean) (default=false)If removeUnusedFragments (boolean) (default=false)If
Import statements in |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论