@plaudit/webpack-extensions 2.14.1 → 2.15.0

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.
@@ -99,10 +99,6 @@ class BlockJSONManagingPlugin {
99
99
  }
100
100
  json["plaudit"]["setup"] = setupFiles.length === 1 ? setupFiles[0] : setupFiles;
101
101
  }
102
- if (json["render"] && (json["acf"] || json["plaudit"])) {
103
- json["render_template"] = json["render"];
104
- delete json["render"];
105
- }
106
102
  if (json["acf"]) {
107
103
  if (json["acf"]["renderTemplate"]) {
108
104
  json["render_template"] = json["acf"]["renderTemplate"];
@@ -126,14 +122,14 @@ class BlockJSONManagingPlugin {
126
122
  }
127
123
  else {
128
124
  let validTemplateLocation, invalidTemplateLocation;
129
- if (json["acf"] || json["plaudit"]) {
130
- validTemplateLocation = "render_template";
131
- invalidTemplateLocation = "render";
132
- }
133
- else {
125
+ if (!json["acf"] && (json["plaudit"] === "native" || (typeof json["plaudit"] === 'object' && json["plaudit"]?.["type"] === "native"))) {
134
126
  validTemplateLocation = "render";
135
127
  invalidTemplateLocation = "render_template";
136
128
  }
129
+ else {
130
+ validTemplateLocation = "render_template";
131
+ invalidTemplateLocation = "render";
132
+ }
137
133
  delete json[invalidTemplateLocation];
138
134
  json[validTemplateLocation] = renderTemplate.length === 1 ? renderTemplate[0] : renderTemplate;
139
135
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plaudit/webpack-extensions",
3
- "version": "2.14.1",
3
+ "version": "2.15.0",
4
4
  "scripts": {
5
5
  "prepublishOnly": "rm -rf build && mkdir build && tsc",
6
6
  "build": "tsc",