eddev 0.1.31 → 0.1.33-beta-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.
|
@@ -76,7 +76,7 @@ var mini_css_extract_plugin_1 = __importDefault(require("mini-css-extract-plugin
|
|
|
76
76
|
var autoprefixer_1 = __importDefault(require("autoprefixer"));
|
|
77
77
|
function getWebpackConfig(opts) {
|
|
78
78
|
return __awaiter(this, void 0, void 0, function () {
|
|
79
|
-
var compiling, ALIAS, ENTRY, PLUGINS, RULES, DEFINES, VIRTUAL_MODULES, EXTERNALS, virtualModules, isServerless, isBrowser, isSSR, isDev, entryDir, distSuffix, outputFolder, loadableManifestFile, writeVirtualModule, updateTemplateRouter, templateLookupPattern, _a, updateBlocksManifest, blockLookupManifest, _b;
|
|
79
|
+
var compiling, ALIAS, ENTRY, PLUGINS, RULES, DEFINES, VIRTUAL_MODULES, EXTERNALS, virtualModules, isServerless, isBrowser, isSSR, isDev, entryDir, distSuffix, outputFolder, loadableManifestFile, writeVirtualModule, updateTemplateRouter, templateLookupPattern, _a, updateBlocksManifest, blockLookupManifest, _b, buildID;
|
|
80
80
|
return __generator(this, function (_c) {
|
|
81
81
|
switch (_c.label) {
|
|
82
82
|
case 0:
|
|
@@ -360,6 +360,7 @@ function getWebpackConfig(opts) {
|
|
|
360
360
|
if (opts.isAdmin) {
|
|
361
361
|
EXTERNALS["react"] = "React";
|
|
362
362
|
}
|
|
363
|
+
buildID = Date.now();
|
|
363
364
|
return [2 /*return*/, {
|
|
364
365
|
mode: opts.mode,
|
|
365
366
|
context: opts.baseDirectory,
|
|
@@ -372,8 +373,10 @@ function getWebpackConfig(opts) {
|
|
|
372
373
|
// chunkIds: "named",
|
|
373
374
|
},
|
|
374
375
|
output: {
|
|
375
|
-
filename: "[name].".concat(opts.isAdmin ? "admin" : "frontend", ".js"),
|
|
376
|
-
|
|
376
|
+
filename: "[name].".concat(opts.isAdmin ? "admin" : "frontend", ".js?v=").concat(buildID),
|
|
377
|
+
chunkFilename: "[name].".concat(opts.isAdmin ? "admin" : "frontend", ".js?v=").concat(buildID),
|
|
378
|
+
// publicPath: isDev ? `//127.0.0.1:${opts.hotPort}/` : `/wp-content/themes/${opts.themeName}/dist/${distSuffix}/`,
|
|
379
|
+
publicPath: "/wp-content/themes/".concat(opts.themeName, "/dist/").concat(distSuffix, "/"),
|
|
377
380
|
path: outputFolder,
|
|
378
381
|
globalObject: isSSR ? "this" : "self",
|
|
379
382
|
clean: true,
|
|
@@ -105,6 +105,7 @@ var graphqlPatterns = {
|
|
|
105
105
|
blocks: "./blocks/**/*.graphql",
|
|
106
106
|
views: "./views/**/*.graphql",
|
|
107
107
|
queries: "./queries/**/*.graphql",
|
|
108
|
+
fragments: "./queries/fragments/**/*.graphql",
|
|
108
109
|
};
|
|
109
110
|
var tsxPatterns = {
|
|
110
111
|
blocks: "./blocks/**/*.tsx",
|
|
@@ -288,10 +289,12 @@ function beginWork(opts) {
|
|
|
288
289
|
// exportFragmentSpreadSubTypes: true,
|
|
289
290
|
inlineFragmentTypes: "combine",
|
|
290
291
|
onlyOperationTypes: true,
|
|
292
|
+
skipTypename: true,
|
|
293
|
+
preResolveTypes: true,
|
|
291
294
|
},
|
|
292
295
|
},
|
|
293
296
|
"types.views.ts": {
|
|
294
|
-
documents: __spreadArray([], documentSets.views, true),
|
|
297
|
+
documents: __spreadArray(__spreadArray([], documentSets.views, true), documentSets.fragments, true),
|
|
295
298
|
plugins: [
|
|
296
299
|
{
|
|
297
300
|
files: {},
|
|
@@ -311,7 +314,7 @@ function beginWork(opts) {
|
|
|
311
314
|
},
|
|
312
315
|
},
|
|
313
316
|
"types.blocks.ts": {
|
|
314
|
-
documents: __spreadArray([], documentSets.blocks, true),
|
|
317
|
+
documents: __spreadArray(__spreadArray([], documentSets.blocks, true), documentSets.fragments, true),
|
|
315
318
|
plugins: [
|
|
316
319
|
{
|
|
317
320
|
files: {},
|
|
@@ -332,7 +335,7 @@ function beginWork(opts) {
|
|
|
332
335
|
var item = _d[_i];
|
|
333
336
|
if (item.name.value === "block") {
|
|
334
337
|
var blockField = (_c = (_b = (_a = item === null || item === void 0 ? void 0 : item.selectionSet) === null || _a === void 0 ? void 0 : _a.selections[0]) === null || _b === void 0 ? void 0 : _b.name) === null || _c === void 0 ? void 0 : _c.value;
|
|
335
|
-
blockSelection = "Exclude<".concat(importedName, "[\"block\"][").concat(JSON.stringify(blockField), "], null>");
|
|
338
|
+
blockSelection = "Exclude<".concat(importedName, "[\"block\"][").concat(JSON.stringify(blockField), "], null | undefined>");
|
|
336
339
|
}
|
|
337
340
|
else {
|
|
338
341
|
queryKeyVals.push([JSON.stringify(item.name.value), "".concat(importedName, "[").concat(JSON.stringify(item.name.value), "]")].join(": "));
|
|
@@ -459,9 +462,11 @@ function beginWork(opts) {
|
|
|
459
462
|
});
|
|
460
463
|
}); };
|
|
461
464
|
watchGlob(Path.resolve(opts.baseDirectory, "./acf-json/*.json"), function (path) {
|
|
465
|
+
needsSchemaFetch = true;
|
|
462
466
|
maybeRegenerate_1(path);
|
|
463
467
|
});
|
|
464
468
|
watchGlob(Path.resolve(opts.baseDirectory, "./backend/**/*.php"), function (path) {
|
|
469
|
+
needsSchemaFetch = true;
|
|
465
470
|
maybeRegenerate_1(path);
|
|
466
471
|
});
|
|
467
472
|
watchGlob(envFile, function () {
|
package/package.json
CHANGED
package/routing/routing.js
CHANGED
|
@@ -326,8 +326,8 @@ exports.Link = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
326
326
|
}
|
|
327
327
|
}, [props.preload]);
|
|
328
328
|
return ((0, jsx_runtime_1.jsx)("a", __assign({ ref: (0, react_merge_refs_1.default)([localRef, ref]) }, props, { onMouseEnter: function (e) {
|
|
329
|
-
if (props.
|
|
330
|
-
props.
|
|
329
|
+
if (props.onMouseEnter) {
|
|
330
|
+
props.onMouseEnter(e);
|
|
331
331
|
}
|
|
332
332
|
router === null || router === void 0 ? void 0 : router.onPreload(e.currentTarget.href);
|
|
333
333
|
}, onClick: function (e) {
|