@hyperspan/plugin-preact 0.1.4 → 0.1.6

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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/index.ts +2 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperspan/plugin-preact",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "Hyperspan Plugin for Preact",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -29,7 +29,7 @@
29
29
  },
30
30
  "peerDependencies": {
31
31
  "@hyperspan/html": "^0.1.7",
32
- "@hyperspan/framework": "^0.2.0"
32
+ "@hyperspan/framework": "^0.4.2"
33
33
  },
34
34
  "dependencies": {
35
35
  "preact": "^10.26.5",
package/src/index.ts CHANGED
@@ -66,6 +66,7 @@ export async function preactPlugin() {
66
66
  minify: true,
67
67
  format: 'esm',
68
68
  target: 'browser',
69
+ env: 'APP_PUBLIC_*',
69
70
  });
70
71
 
71
72
  contents = await result.outputs[0].text();
@@ -115,7 +116,7 @@ function __hs_renderIsland(jsContent = '', ssrContent = '', options = {}) {
115
116
  return \`<div id="${jsId}">\${ssrContent}</div><div data-loading="lazy" style="height:1px;width:1px;overflow:hidden;"><template><script type="module" data-source-id="${jsId}">${contents}\${jsContent}</script></template></div>\`;
116
117
  }
117
118
 
118
- return \`<div id="${jsId}">\${ssrContent}</div><script type="module" data-source-id="${jsId}">\${jsContent}</script>\`;
119
+ return \`<div id="${jsId}">\${ssrContent}</div><script type="module" data-source-id="${jsId}">${contents}\${jsContent}</script>\`;
119
120
  }
120
121
  ${componentName}.__HS_ISLAND = {
121
122
  id: "${jsId}",