@graphcommerce/next-config 9.0.0-canary.58 → 9.0.0-canary.59
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/CHANGELOG.md
CHANGED
|
@@ -187,6 +187,14 @@ it('finds plugins', () => {
|
|
|
187
187
|
"targetModule": "@graphcommerce/ecommerce-ui",
|
|
188
188
|
"type": "component",
|
|
189
189
|
},
|
|
190
|
+
{
|
|
191
|
+
"enabled": true,
|
|
192
|
+
"sourceExport": "meshConfig",
|
|
193
|
+
"sourceModule": "@graphcommerce/graphql-mesh/plugins/meshConfigFake",
|
|
194
|
+
"targetExport": "meshConfig",
|
|
195
|
+
"targetModule": "@graphcommerce/graphql-mesh/meshConfig",
|
|
196
|
+
"type": "function",
|
|
197
|
+
},
|
|
190
198
|
{
|
|
191
199
|
"enabled": true,
|
|
192
200
|
"sourceExport": "plugin",
|
|
@@ -81,7 +81,7 @@ function findOriginalSource(plug, resolved, resolve) {
|
|
|
81
81
|
if (!resolved?.source)
|
|
82
82
|
return {
|
|
83
83
|
resolved: undefined,
|
|
84
|
-
error: new Error(`
|
|
84
|
+
error: new Error(`Plugin: Can not find module ${plug.targetModule} for ${plug.sourceModule}`),
|
|
85
85
|
};
|
|
86
86
|
// const cacheKey = `${plug.targetModule}#${plug.targetExport}`
|
|
87
87
|
// if (cachedResults.has(cacheKey)) {
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.withGraphCommerce = withGraphCommerce;
|
|
7
|
-
|
|
4
|
+
// import CircularDependencyPlugin from 'circular-dependency-plugin'
|
|
8
5
|
const plugin_1 = require("inspectpack/plugin");
|
|
9
6
|
const webpack_1 = require("webpack");
|
|
10
7
|
const loadConfig_1 = require("./config/loadConfig");
|
|
@@ -114,11 +111,13 @@ function withGraphCommerce(nextConfig, cwd) {
|
|
|
114
111
|
// To properly properly treeshake @apollo/client we need to define the __DEV__ property
|
|
115
112
|
config.plugins.push(new webpack_1.DefinePlugin({ 'globalThis.__DEV__': options.dev }));
|
|
116
113
|
if (!options.isServer) {
|
|
117
|
-
if (graphcommerceConfig.debug?.webpackCircularDependencyPlugin) {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
}
|
|
114
|
+
// if (graphcommerceConfig.debug?.webpackCircularDependencyPlugin) {
|
|
115
|
+
// config.plugins.push(
|
|
116
|
+
// new CircularDependencyPlugin({
|
|
117
|
+
// exclude: /readable-stream|duplexer2|node_modules\/next/,
|
|
118
|
+
// }),
|
|
119
|
+
// )
|
|
120
|
+
// }
|
|
122
121
|
if (graphcommerceConfig.debug?.webpackDuplicatesPlugin) {
|
|
123
122
|
config.plugins.push(new plugin_1.DuplicatesPlugin({
|
|
124
123
|
ignoredPackages: [
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@graphcommerce/next-config",
|
|
3
3
|
"homepage": "https://www.graphcommerce.org/",
|
|
4
4
|
"repository": "github:graphcommerce-org/graphcommerce",
|
|
5
|
-
"version": "9.0.0-canary.
|
|
5
|
+
"version": "9.0.0-canary.59",
|
|
6
6
|
"type": "commonjs",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"types": "src/index.ts",
|
|
@@ -93,7 +93,7 @@ export function findOriginalSource(
|
|
|
93
93
|
if (!resolved?.source)
|
|
94
94
|
return {
|
|
95
95
|
resolved: undefined,
|
|
96
|
-
error: new Error(`
|
|
96
|
+
error: new Error(`Plugin: Can not find module ${plug.targetModule} for ${plug.sourceModule}`),
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
// const cacheKey = `${plug.targetModule}#${plug.targetExport}`
|
package/src/withGraphCommerce.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import CircularDependencyPlugin from 'circular-dependency-plugin'
|
|
1
|
+
// import CircularDependencyPlugin from 'circular-dependency-plugin'
|
|
2
2
|
import { DuplicatesPlugin } from 'inspectpack/plugin'
|
|
3
3
|
import type { NextConfig } from 'next'
|
|
4
4
|
import { DomainLocale } from 'next/dist/server/config'
|
|
@@ -135,13 +135,13 @@ export function withGraphCommerce(nextConfig: NextConfig, cwd: string): NextConf
|
|
|
135
135
|
config.plugins.push(new DefinePlugin({ 'globalThis.__DEV__': options.dev }))
|
|
136
136
|
|
|
137
137
|
if (!options.isServer) {
|
|
138
|
-
if (graphcommerceConfig.debug?.webpackCircularDependencyPlugin) {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
}
|
|
138
|
+
// if (graphcommerceConfig.debug?.webpackCircularDependencyPlugin) {
|
|
139
|
+
// config.plugins.push(
|
|
140
|
+
// new CircularDependencyPlugin({
|
|
141
|
+
// exclude: /readable-stream|duplexer2|node_modules\/next/,
|
|
142
|
+
// }),
|
|
143
|
+
// )
|
|
144
|
+
// }
|
|
145
145
|
if (graphcommerceConfig.debug?.webpackDuplicatesPlugin) {
|
|
146
146
|
config.plugins.push(
|
|
147
147
|
new DuplicatesPlugin({
|