@graphql-tools/webpack-loader 6.6.0 → 6.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +7 -6
- package/es5/README.md +0 -55
- package/es5/index.d.ts +0 -11
- package/es5/index.js +0 -141
- package/es5/index.mjs +0 -137
- package/es5/package.json +0 -36
- package/es5/parser.d.ts +0 -2
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ query MyQuery {
|
|
|
27
27
|
|
|
28
28
|
If you have configured [the webpack @graphql-tools/webpack-loader](#webpack-loading-and-preprocessing), you can import modules containing graphQL queries. The imported value will be the pre-built AST.
|
|
29
29
|
|
|
30
|
-
```
|
|
30
|
+
```ts
|
|
31
31
|
import MyQuery from './query.graphql'
|
|
32
32
|
```
|
|
33
33
|
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-tools/webpack-loader",
|
|
3
|
-
"version": "6.6.
|
|
3
|
+
"version": "6.6.3",
|
|
4
4
|
"description": "A set of utils for faster development of GraphQL tools",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"peerDependencies": {
|
|
7
|
-
"graphql": "^14.0.0 || ^15.0.0 || ^16.0.0"
|
|
7
|
+
"graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@graphql-tools/optimize": "
|
|
11
|
-
"@graphql-tools/webpack-loader-runtime": "
|
|
12
|
-
"tslib": "
|
|
10
|
+
"@graphql-tools/optimize": "1.2.1",
|
|
11
|
+
"@graphql-tools/webpack-loader-runtime": "6.3.1",
|
|
12
|
+
"tslib": "^2.4.0"
|
|
13
13
|
},
|
|
14
14
|
"repository": {
|
|
15
15
|
"type": "git",
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
"./*": {
|
|
32
32
|
"require": "./*.js",
|
|
33
33
|
"import": "./*.mjs"
|
|
34
|
-
}
|
|
34
|
+
},
|
|
35
|
+
"./package.json": "./package.json"
|
|
35
36
|
}
|
|
36
37
|
}
|
package/es5/README.md
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
# GraphQL Tools Webpack Loader
|
|
2
|
-
|
|
3
|
-
A webpack loader to preprocess GraphQL Documents (operations, fragments and SDL)
|
|
4
|
-
|
|
5
|
-
Slightly different fork of [graphql-tag/loader](https://github.com/apollographql/graphql-tag/pull/304).
|
|
6
|
-
|
|
7
|
-
yarn add @graphql-tools/webpack-loader
|
|
8
|
-
|
|
9
|
-
How is it different from `graphql-tag`? It removes locations entirely, doesn't include sources (string content of imported files), no warnings about duplicated fragment names and supports more custom scenarios.
|
|
10
|
-
|
|
11
|
-
## Options
|
|
12
|
-
|
|
13
|
-
- noDescription (_default: false_) - removes descriptions
|
|
14
|
-
- esModule (_default: false_) - uses import and export statements instead of CommonJS
|
|
15
|
-
|
|
16
|
-
## Importing GraphQL files
|
|
17
|
-
|
|
18
|
-
_To add support for importing `.graphql`/`.gql` files, see [Webpack loading and preprocessing](#webpack-loading-and-preprocessing) below._
|
|
19
|
-
|
|
20
|
-
Given a file `MyQuery.graphql`
|
|
21
|
-
|
|
22
|
-
```graphql
|
|
23
|
-
query MyQuery {
|
|
24
|
-
...
|
|
25
|
-
}
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
If you have configured [the webpack @graphql-tools/webpack-loader](#webpack-loading-and-preprocessing), you can import modules containing graphQL queries. The imported value will be the pre-built AST.
|
|
29
|
-
|
|
30
|
-
```typescript
|
|
31
|
-
import MyQuery from './query.graphql'
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
### Preprocessing queries and fragments
|
|
35
|
-
|
|
36
|
-
Preprocessing GraphQL queries and fragments into ASTs at build time can greatly improve load times.
|
|
37
|
-
|
|
38
|
-
#### Webpack loading and preprocessing
|
|
39
|
-
|
|
40
|
-
Using the included `@graphql-tools/webpack-loader` it is possible to maintain query logic that is separate from the rest of your application logic. With the loader configured, imported graphQL files will be converted to AST during the webpack build process.
|
|
41
|
-
|
|
42
|
-
```js
|
|
43
|
-
{
|
|
44
|
-
loaders: [
|
|
45
|
-
{
|
|
46
|
-
test: /\.(graphql|gql)$/,
|
|
47
|
-
exclude: /node_modules/,
|
|
48
|
-
loader: '@graphql-tools/webpack-loader',
|
|
49
|
-
options: {
|
|
50
|
-
/* ... */
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
],
|
|
54
|
-
}
|
|
55
|
-
```
|
package/es5/index.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { LoaderContext } from 'webpack';
|
|
2
|
-
interface Options {
|
|
3
|
-
noDescription?: boolean;
|
|
4
|
-
noEmptyNodes?: boolean;
|
|
5
|
-
noLoc?: boolean;
|
|
6
|
-
replaceKinds?: boolean;
|
|
7
|
-
esModule?: boolean;
|
|
8
|
-
importHelpers?: boolean;
|
|
9
|
-
}
|
|
10
|
-
export default function graphqlLoader(this: LoaderContext<Options>, source: string): string;
|
|
11
|
-
export {};
|
package/es5/index.js
DELETED
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
4
|
-
|
|
5
|
-
const os = _interopDefault(require('os'));
|
|
6
|
-
const graphql = require('graphql');
|
|
7
|
-
const webpackLoaderRuntime = require('@graphql-tools/webpack-loader-runtime/es5');
|
|
8
|
-
const optimize = require('@graphql-tools/optimize/es5');
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Strip insignificant whitespace
|
|
12
|
-
* Note that this could do a lot more, such as reorder fields etc.
|
|
13
|
-
*/
|
|
14
|
-
function normalize(str) {
|
|
15
|
-
return str.replace(/[\s,]+/g, ' ').trim();
|
|
16
|
-
}
|
|
17
|
-
// A map docString -> graphql document
|
|
18
|
-
var docCache = {};
|
|
19
|
-
// A map fragmentName -> [normalized source]
|
|
20
|
-
var fragmentSourceMap = {};
|
|
21
|
-
function cacheKeyFromFragment(fragment) {
|
|
22
|
-
return normalize(graphql.print(fragment));
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Take a unstripped parsed document (query/mutation or even fragment), and
|
|
26
|
-
* check all fragment definitions, checking for name->source uniqueness.
|
|
27
|
-
* We also want to make sure only unique fragments exist in the document.
|
|
28
|
-
*/
|
|
29
|
-
function processFragments(ast) {
|
|
30
|
-
var astFragmentMap = {};
|
|
31
|
-
var definitions = [];
|
|
32
|
-
for (var i = 0; i < ast.definitions.length; i++) {
|
|
33
|
-
var fragmentDefinition = ast.definitions[i];
|
|
34
|
-
if (fragmentDefinition.kind === graphql.Kind.FRAGMENT_DEFINITION) {
|
|
35
|
-
var fragmentName = fragmentDefinition.name.value;
|
|
36
|
-
var sourceKey = cacheKeyFromFragment(fragmentDefinition);
|
|
37
|
-
// We know something about this fragment
|
|
38
|
-
if (fragmentSourceMap.hasOwnProperty(fragmentName) && !fragmentSourceMap[fragmentName][sourceKey]) {
|
|
39
|
-
fragmentSourceMap[fragmentName][sourceKey] = true;
|
|
40
|
-
}
|
|
41
|
-
else if (!fragmentSourceMap.hasOwnProperty(fragmentName)) {
|
|
42
|
-
fragmentSourceMap[fragmentName] = {};
|
|
43
|
-
fragmentSourceMap[fragmentName][sourceKey] = true;
|
|
44
|
-
}
|
|
45
|
-
if (!astFragmentMap[sourceKey]) {
|
|
46
|
-
astFragmentMap[sourceKey] = true;
|
|
47
|
-
definitions.push(fragmentDefinition);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
else {
|
|
51
|
-
definitions.push(fragmentDefinition);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
ast.definitions = definitions;
|
|
55
|
-
return ast;
|
|
56
|
-
}
|
|
57
|
-
function parseDocument(doc) {
|
|
58
|
-
var cacheKey = normalize(doc);
|
|
59
|
-
if (docCache[cacheKey]) {
|
|
60
|
-
return docCache[cacheKey];
|
|
61
|
-
}
|
|
62
|
-
var parsed = graphql.parse(doc, {
|
|
63
|
-
noLocation: true,
|
|
64
|
-
});
|
|
65
|
-
if (!parsed || parsed.kind !== 'Document') {
|
|
66
|
-
throw new Error('Not a valid GraphQL document.');
|
|
67
|
-
}
|
|
68
|
-
// check that all "new" fragments inside the documents are consistent with
|
|
69
|
-
// existing fragments of the same name
|
|
70
|
-
docCache[cacheKey] = processFragments(parsed);
|
|
71
|
-
return parsed;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
function isSDL(doc) {
|
|
75
|
-
return !doc.definitions.some(function (def) { return graphql.isExecutableDefinitionNode(def); });
|
|
76
|
-
}
|
|
77
|
-
function expandImports(source, options) {
|
|
78
|
-
var lines = source.split(/\r\n|\r|\n/);
|
|
79
|
-
var outputCode = options.importHelpers
|
|
80
|
-
? "\n var useUnique = require('@graphql-tools/webpack-loader-runtime/es5').useUnique;\n var unique = useUnique();\n "
|
|
81
|
-
: "\n " + webpackLoaderRuntime.uniqueCode + "\n ";
|
|
82
|
-
lines.some(function (line) {
|
|
83
|
-
if (line[0] === '#' && line.slice(1).split(' ')[0] === 'import') {
|
|
84
|
-
var importFile = line.slice(1).split(' ')[1];
|
|
85
|
-
var parseDocument_1 = "require(" + importFile + ")";
|
|
86
|
-
var appendDef = "doc.definitions = doc.definitions.concat(unique(" + parseDocument_1 + ".definitions));";
|
|
87
|
-
outputCode += appendDef + os.EOL;
|
|
88
|
-
}
|
|
89
|
-
return line.length !== 0 && line[0] !== '#';
|
|
90
|
-
});
|
|
91
|
-
return outputCode;
|
|
92
|
-
}
|
|
93
|
-
function graphqlLoader(source) {
|
|
94
|
-
this.cacheable();
|
|
95
|
-
// TODO: This should probably use this.getOptions()
|
|
96
|
-
var options = this.query || {};
|
|
97
|
-
var doc = parseDocument(source);
|
|
98
|
-
var optimizers = [];
|
|
99
|
-
if (options.noDescription) {
|
|
100
|
-
optimizers.push(optimize.removeDescriptions);
|
|
101
|
-
}
|
|
102
|
-
if (options.noEmptyNodes) {
|
|
103
|
-
optimizers.push(optimize.removeEmptyNodes);
|
|
104
|
-
}
|
|
105
|
-
if (optimizers.length > 0 && isSDL(doc)) {
|
|
106
|
-
doc = optimize.optimizeDocumentNode(doc, optimizers);
|
|
107
|
-
}
|
|
108
|
-
var stringifiedDoc = JSON.stringify(doc);
|
|
109
|
-
if (options.replaceKinds) {
|
|
110
|
-
for (var identifier in graphql.Kind) {
|
|
111
|
-
var value = graphql.Kind[identifier];
|
|
112
|
-
stringifiedDoc = stringifiedDoc.replace(new RegExp("\"kind\":\"" + value + "\"", 'g'), "\"kind\": Kind." + identifier);
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
var headerCode = "\n " + (options.replaceKinds ? "var Kind = require('graphql/language/kinds');" : '') + "\n var doc = " + stringifiedDoc + ";\n ";
|
|
116
|
-
var outputCode = '';
|
|
117
|
-
// Allow multiple query/mutation definitions in a file. This parses out dependencies
|
|
118
|
-
// at compile time, and then uses those at load time to create minimal query documents
|
|
119
|
-
// We cannot do the latter at compile time due to how the #import code works.
|
|
120
|
-
var operationCount = doc.definitions.reduce(function (accum, op) {
|
|
121
|
-
if (op.kind === graphql.Kind.OPERATION_DEFINITION) {
|
|
122
|
-
return accum + 1;
|
|
123
|
-
}
|
|
124
|
-
return accum;
|
|
125
|
-
}, 0);
|
|
126
|
-
function exportDefaultStatement(identifier) {
|
|
127
|
-
if (options.esModule) {
|
|
128
|
-
return "export default " + identifier;
|
|
129
|
-
}
|
|
130
|
-
return "module.exports = " + identifier;
|
|
131
|
-
}
|
|
132
|
-
if (operationCount > 1) {
|
|
133
|
-
throw new Error('GraphQL Webpack Loader allows only for one GraphQL Operation per file');
|
|
134
|
-
}
|
|
135
|
-
outputCode += "\n " + exportDefaultStatement('doc') + "\n ";
|
|
136
|
-
var importOutputCode = expandImports(source, options);
|
|
137
|
-
var allCode = [headerCode, importOutputCode, outputCode, ''].join(os.EOL);
|
|
138
|
-
return allCode;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
module.exports = graphqlLoader;
|
package/es5/index.mjs
DELETED
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
import os from 'os';
|
|
2
|
-
import { parse, Kind, print, isExecutableDefinitionNode } from 'graphql';
|
|
3
|
-
import { uniqueCode } from '@graphql-tools/webpack-loader-runtime/es5';
|
|
4
|
-
import { optimizeDocumentNode, removeDescriptions, removeEmptyNodes } from '@graphql-tools/optimize/es5';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Strip insignificant whitespace
|
|
8
|
-
* Note that this could do a lot more, such as reorder fields etc.
|
|
9
|
-
*/
|
|
10
|
-
function normalize(str) {
|
|
11
|
-
return str.replace(/[\s,]+/g, ' ').trim();
|
|
12
|
-
}
|
|
13
|
-
// A map docString -> graphql document
|
|
14
|
-
var docCache = {};
|
|
15
|
-
// A map fragmentName -> [normalized source]
|
|
16
|
-
var fragmentSourceMap = {};
|
|
17
|
-
function cacheKeyFromFragment(fragment) {
|
|
18
|
-
return normalize(print(fragment));
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Take a unstripped parsed document (query/mutation or even fragment), and
|
|
22
|
-
* check all fragment definitions, checking for name->source uniqueness.
|
|
23
|
-
* We also want to make sure only unique fragments exist in the document.
|
|
24
|
-
*/
|
|
25
|
-
function processFragments(ast) {
|
|
26
|
-
var astFragmentMap = {};
|
|
27
|
-
var definitions = [];
|
|
28
|
-
for (var i = 0; i < ast.definitions.length; i++) {
|
|
29
|
-
var fragmentDefinition = ast.definitions[i];
|
|
30
|
-
if (fragmentDefinition.kind === Kind.FRAGMENT_DEFINITION) {
|
|
31
|
-
var fragmentName = fragmentDefinition.name.value;
|
|
32
|
-
var sourceKey = cacheKeyFromFragment(fragmentDefinition);
|
|
33
|
-
// We know something about this fragment
|
|
34
|
-
if (fragmentSourceMap.hasOwnProperty(fragmentName) && !fragmentSourceMap[fragmentName][sourceKey]) {
|
|
35
|
-
fragmentSourceMap[fragmentName][sourceKey] = true;
|
|
36
|
-
}
|
|
37
|
-
else if (!fragmentSourceMap.hasOwnProperty(fragmentName)) {
|
|
38
|
-
fragmentSourceMap[fragmentName] = {};
|
|
39
|
-
fragmentSourceMap[fragmentName][sourceKey] = true;
|
|
40
|
-
}
|
|
41
|
-
if (!astFragmentMap[sourceKey]) {
|
|
42
|
-
astFragmentMap[sourceKey] = true;
|
|
43
|
-
definitions.push(fragmentDefinition);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
else {
|
|
47
|
-
definitions.push(fragmentDefinition);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
ast.definitions = definitions;
|
|
51
|
-
return ast;
|
|
52
|
-
}
|
|
53
|
-
function parseDocument(doc) {
|
|
54
|
-
var cacheKey = normalize(doc);
|
|
55
|
-
if (docCache[cacheKey]) {
|
|
56
|
-
return docCache[cacheKey];
|
|
57
|
-
}
|
|
58
|
-
var parsed = parse(doc, {
|
|
59
|
-
noLocation: true,
|
|
60
|
-
});
|
|
61
|
-
if (!parsed || parsed.kind !== 'Document') {
|
|
62
|
-
throw new Error('Not a valid GraphQL document.');
|
|
63
|
-
}
|
|
64
|
-
// check that all "new" fragments inside the documents are consistent with
|
|
65
|
-
// existing fragments of the same name
|
|
66
|
-
docCache[cacheKey] = processFragments(parsed);
|
|
67
|
-
return parsed;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
function isSDL(doc) {
|
|
71
|
-
return !doc.definitions.some(function (def) { return isExecutableDefinitionNode(def); });
|
|
72
|
-
}
|
|
73
|
-
function expandImports(source, options) {
|
|
74
|
-
var lines = source.split(/\r\n|\r|\n/);
|
|
75
|
-
var outputCode = options.importHelpers
|
|
76
|
-
? "\n var useUnique = require('@graphql-tools/webpack-loader-runtime/es5').useUnique;\n var unique = useUnique();\n "
|
|
77
|
-
: "\n " + uniqueCode + "\n ";
|
|
78
|
-
lines.some(function (line) {
|
|
79
|
-
if (line[0] === '#' && line.slice(1).split(' ')[0] === 'import') {
|
|
80
|
-
var importFile = line.slice(1).split(' ')[1];
|
|
81
|
-
var parseDocument_1 = "require(" + importFile + ")";
|
|
82
|
-
var appendDef = "doc.definitions = doc.definitions.concat(unique(" + parseDocument_1 + ".definitions));";
|
|
83
|
-
outputCode += appendDef + os.EOL;
|
|
84
|
-
}
|
|
85
|
-
return line.length !== 0 && line[0] !== '#';
|
|
86
|
-
});
|
|
87
|
-
return outputCode;
|
|
88
|
-
}
|
|
89
|
-
function graphqlLoader(source) {
|
|
90
|
-
this.cacheable();
|
|
91
|
-
// TODO: This should probably use this.getOptions()
|
|
92
|
-
var options = this.query || {};
|
|
93
|
-
var doc = parseDocument(source);
|
|
94
|
-
var optimizers = [];
|
|
95
|
-
if (options.noDescription) {
|
|
96
|
-
optimizers.push(removeDescriptions);
|
|
97
|
-
}
|
|
98
|
-
if (options.noEmptyNodes) {
|
|
99
|
-
optimizers.push(removeEmptyNodes);
|
|
100
|
-
}
|
|
101
|
-
if (optimizers.length > 0 && isSDL(doc)) {
|
|
102
|
-
doc = optimizeDocumentNode(doc, optimizers);
|
|
103
|
-
}
|
|
104
|
-
var stringifiedDoc = JSON.stringify(doc);
|
|
105
|
-
if (options.replaceKinds) {
|
|
106
|
-
for (var identifier in Kind) {
|
|
107
|
-
var value = Kind[identifier];
|
|
108
|
-
stringifiedDoc = stringifiedDoc.replace(new RegExp("\"kind\":\"" + value + "\"", 'g'), "\"kind\": Kind." + identifier);
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
var headerCode = "\n " + (options.replaceKinds ? "var Kind = require('graphql/language/kinds');" : '') + "\n var doc = " + stringifiedDoc + ";\n ";
|
|
112
|
-
var outputCode = '';
|
|
113
|
-
// Allow multiple query/mutation definitions in a file. This parses out dependencies
|
|
114
|
-
// at compile time, and then uses those at load time to create minimal query documents
|
|
115
|
-
// We cannot do the latter at compile time due to how the #import code works.
|
|
116
|
-
var operationCount = doc.definitions.reduce(function (accum, op) {
|
|
117
|
-
if (op.kind === Kind.OPERATION_DEFINITION) {
|
|
118
|
-
return accum + 1;
|
|
119
|
-
}
|
|
120
|
-
return accum;
|
|
121
|
-
}, 0);
|
|
122
|
-
function exportDefaultStatement(identifier) {
|
|
123
|
-
if (options.esModule) {
|
|
124
|
-
return "export default " + identifier;
|
|
125
|
-
}
|
|
126
|
-
return "module.exports = " + identifier;
|
|
127
|
-
}
|
|
128
|
-
if (operationCount > 1) {
|
|
129
|
-
throw new Error('GraphQL Webpack Loader allows only for one GraphQL Operation per file');
|
|
130
|
-
}
|
|
131
|
-
outputCode += "\n " + exportDefaultStatement('doc') + "\n ";
|
|
132
|
-
var importOutputCode = expandImports(source, options);
|
|
133
|
-
var allCode = [headerCode, importOutputCode, outputCode, ''].join(os.EOL);
|
|
134
|
-
return allCode;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
export default graphqlLoader;
|
package/es5/package.json
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@graphql-tools/webpack-loader/es5",
|
|
3
|
-
"version": "6.6.0",
|
|
4
|
-
"description": "A set of utils for faster development of GraphQL tools",
|
|
5
|
-
"sideEffects": false,
|
|
6
|
-
"peerDependencies": {
|
|
7
|
-
"graphql": "^14.0.0 || ^15.0.0 || ^16.0.0"
|
|
8
|
-
},
|
|
9
|
-
"dependencies": {
|
|
10
|
-
"@graphql-tools/optimize": "^1.1.0",
|
|
11
|
-
"@graphql-tools/webpack-loader-runtime": "^6.3.0",
|
|
12
|
-
"tslib": "~2.3.0"
|
|
13
|
-
},
|
|
14
|
-
"repository": {
|
|
15
|
-
"type": "git",
|
|
16
|
-
"url": "ardatan/graphql-tools",
|
|
17
|
-
"directory": "packages/webpack-loader"
|
|
18
|
-
},
|
|
19
|
-
"license": "MIT",
|
|
20
|
-
"main": "index.js",
|
|
21
|
-
"module": "index.mjs",
|
|
22
|
-
"typings": "index.d.ts",
|
|
23
|
-
"typescript": {
|
|
24
|
-
"definition": "index.d.ts"
|
|
25
|
-
},
|
|
26
|
-
"exports": {
|
|
27
|
-
".": {
|
|
28
|
-
"require": "./index.js",
|
|
29
|
-
"import": "./index.mjs"
|
|
30
|
-
},
|
|
31
|
-
"./*": {
|
|
32
|
-
"require": "./*.js",
|
|
33
|
-
"import": "./*.mjs"
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
package/es5/parser.d.ts
DELETED