@ninetailed/experience.js-gatsby 3.0.0-beta.33 → 3.0.0-beta.34

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/gatsby-browser.js CHANGED
@@ -47,9 +47,9 @@ const WrapRootElement = _a => {
47
47
  } = _a,
48
48
  options = __rest(_a, ["children"]);
49
49
  const resolvedPlugins = loaders_ninetailedPlugins.plugins.map(({
50
- plugin,
50
+ PluginCtor,
51
51
  options
52
- }) => plugin(options));
52
+ }) => new PluginCtor(options));
53
53
  return /*#__PURE__*/React__default["default"].createElement(experience_jsReact.NinetailedProvider, Object.assign({}, options, {
54
54
  plugins: resolvedPlugins
55
55
  }), /*#__PURE__*/React__default["default"].createElement(Tracker.Tracker, null), children);
package/gatsby-ssr.js CHANGED
@@ -14,9 +14,9 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
14
14
 
15
15
  const wrapRootElement = (args, options) => {
16
16
  const resolvedPlugins = loaders_ninetailedPlugins.plugins.map(({
17
- plugin,
17
+ PluginCtor,
18
18
  options
19
- }) => plugin(options));
19
+ }) => new PluginCtor(options));
20
20
  const {
21
21
  element
22
22
  } = args;
@@ -6316,7 +6316,7 @@ const loaderUtils = lib$1;
6316
6316
  */
6317
6317
  var ninetailedPlugins = function () {
6318
6318
  const options = loaderUtils.getOptions(this);
6319
- const pluginRequires = !options.plugins ? `[]` : `[` + options.plugins.map(plugin => `{plugin: require("${plugin.resolve ? plugin.resolve : plugin}").default, options: ${JSON.stringify(plugin.options)}}`).join(`,`) + `]`;
6319
+ const pluginRequires = !options.plugins ? `[]` : `[` + options.plugins.map(plugin => `{PluginCtor: require("${plugin.resolve ? plugin.resolve : plugin}").default, options: ${JSON.stringify(plugin.options)}}`).join(`,`) + `]`;
6320
6320
  return `module.exports = {plugins: ${pluginRequires}}`;
6321
6321
  };
6322
6322
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ninetailed/experience.js-gatsby",
3
- "version": "3.0.0-beta.33",
3
+ "version": "3.0.0-beta.34",
4
4
  "keywords": [
5
5
  "gatsby",
6
6
  "gatsby-plugin",
@@ -18,7 +18,7 @@
18
18
  "type": "commonjs",
19
19
  "types": "./index.d.ts",
20
20
  "dependencies": {
21
- "@ninetailed/experience.js-react": "3.0.0-beta.33",
21
+ "@ninetailed/experience.js-react": "3.0.0-beta.34",
22
22
  "gatsby-plugin-utils": "3.19.0"
23
23
  }
24
24
  }