@maizzle/framework 6.0.0-6 → 6.0.0-7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maizzle/framework",
3
- "version": "6.0.0-6",
3
+ "version": "6.0.0-7",
4
4
  "description": "Maizzle is a framework that helps you quickly build HTML emails with Tailwind CSS.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -118,16 +118,25 @@ export async function readFileConfig(config) {
118
118
  }
119
119
 
120
120
  /**
121
- * Override the `content` key in `baseConfig` with the one in `envConfig`.
122
- *
123
- * This is done so that each build uses its own `content` paths, in
124
- * order to avoid compiling unnecessary files.
121
+ * Override the `build.content` key in `baseConfig` with the one in `envConfig`
122
+ * if present. We do this so that each build uses its own `content` paths,
123
+ * in order to avoid compiling unnecessary files.
125
124
  */
126
- if (Array.isArray(envConfig.content)) {
127
- baseConfig.content = []
125
+ if (envConfig.build && Array.isArray(envConfig.build.content)) {
126
+ baseConfig.build = baseConfig.build || {}
127
+ baseConfig.build.content = envConfig.build.content
128
+ // Remove build.content from envConfig to prevent merging duplicates
129
+ envConfig = { ...envConfig, build: { ...envConfig.build, content: undefined } }
130
+ }
131
+
132
+ // Merge envConfig and baseConfig, but ensure build.content is not duplicated
133
+ const merged = merge(envConfig, baseConfig)
134
+
135
+ if (baseConfig.build && Array.isArray(baseConfig.build.content)) {
136
+ merged.build.content = baseConfig.build.content
128
137
  }
129
138
 
130
- return merge(envConfig, baseConfig)
139
+ return merged
131
140
  } catch (_error) {
132
141
  throw new Error('Could not compute config')
133
142
  }