@pure-ds/core 0.5.17 → 0.5.18

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,7 +1,7 @@
1
1
  {
2
2
  "name": "@pure-ds/core",
3
3
  "shortname": "pds",
4
- "version": "0.5.17",
4
+ "version": "0.5.18",
5
5
  "description": "Pure Design System - Why develop a Design System when you can generate one?",
6
6
  "repository": {
7
7
  "type": "git",
@@ -335,10 +335,8 @@ settingsBtn.addEventListener('click', () => {
335
335
  }
336
336
 
337
337
  function buildPdsConfig() {
338
- return `import { PDS } from '@pure-ds/core';
339
-
340
- const defaultEnhancers = Array.isArray(PDS.defaultEnhancers)
341
- ? PDS.defaultEnhancers
338
+ return `const defaultEnhancers = Array.isArray(globalThis.PDS?.defaultEnhancers)
339
+ ? globalThis.PDS.defaultEnhancers
342
340
  : [];
343
341
 
344
342
  export const config = {
@@ -156,10 +156,8 @@ async function ensurePdsConfig(consumerRoot, force = false) {
156
156
  // File doesn't exist, create it
157
157
  }
158
158
 
159
- const defaultConfig = `import { PDS } from '@pure-ds/core';
160
-
161
- const defaultEnhancers = Array.isArray(PDS.defaultEnhancers)
162
- ? PDS.defaultEnhancers
159
+ const defaultConfig = `const defaultEnhancers = Array.isArray(globalThis.PDS?.defaultEnhancers)
160
+ ? globalThis.PDS.defaultEnhancers
163
161
  : [];
164
162
 
165
163
  export const config = {