@pradip1995/framework-compiler 0.3.2 → 0.3.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.
|
@@ -41,9 +41,11 @@ function formatPluginEntry(key, definition) {
|
|
|
41
41
|
return lines.join("\n")
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
function buildPluginsBlock(enabledPlugins) {
|
|
44
|
+
function buildPluginsBlock(enabledPlugins, moduleOnlyPlugins = []) {
|
|
45
|
+
const skip = new Set(moduleOnlyPlugins)
|
|
45
46
|
const entries = []
|
|
46
47
|
for (const key of enabledPlugins) {
|
|
48
|
+
if (skip.has(key)) continue
|
|
47
49
|
const definition = pluginDefinitions[key]
|
|
48
50
|
if (!definition) {
|
|
49
51
|
throw new Error(`Unknown plugin "${key}" — add it to plugin-definitions.cjs or remove from plugins.config.json`)
|
|
@@ -57,7 +59,7 @@ function hasPlugin(enabledPlugins, name) {
|
|
|
57
59
|
return enabledPlugins.includes(name)
|
|
58
60
|
}
|
|
59
61
|
|
|
60
|
-
function generateMedusaConfig({ enabledPlugins, preset = "full" }) {
|
|
62
|
+
function generateMedusaConfig({ enabledPlugins, preset = "full", moduleOnlyPlugins = [] }) {
|
|
61
63
|
const useShiprocket =
|
|
62
64
|
preset === "full" && hasPlugin(enabledPlugins, "medusa-shiprocket-fulfillment-sbl")
|
|
63
65
|
const usePaymentProvider =
|
|
@@ -244,7 +246,7 @@ module.exports = defineConfig({
|
|
|
244
246
|
},
|
|
245
247
|
},
|
|
246
248
|
plugins: [
|
|
247
|
-
${buildPluginsBlock(enabledPlugins)}
|
|
249
|
+
${buildPluginsBlock(enabledPlugins, moduleOnlyPlugins)}
|
|
248
250
|
],
|
|
249
251
|
modules: {
|
|
250
252
|
[Modules.AUTH]: {
|
package/bin/backend-build.js
CHANGED
|
@@ -160,7 +160,11 @@ function main() {
|
|
|
160
160
|
|
|
161
161
|
writeFileSync(
|
|
162
162
|
join(outDir, "medusa-config.ts"),
|
|
163
|
-
generateMedusaConfig({
|
|
163
|
+
generateMedusaConfig({
|
|
164
|
+
enabledPlugins,
|
|
165
|
+
preset,
|
|
166
|
+
moduleOnlyPlugins: defaults.moduleOnlyPlugins || [],
|
|
167
|
+
})
|
|
164
168
|
)
|
|
165
169
|
|
|
166
170
|
writeFileSync(
|