@vyckr/tachyon 1.3.4 → 1.3.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vyckr/tachyon",
3
- "version": "1.3.4",
3
+ "version": "1.3.6",
4
4
  "description": "A polyglot, file-system-routed full-stack framework for Bun",
5
5
  "author": "Chidelma",
6
6
  "license": "MIT",
@@ -240,10 +240,11 @@ export default class Yon {
240
240
 
241
241
  let code = await Bun.file(TEMPLATE_PATH).text();
242
242
 
243
- code = code
244
- .replaceAll('// imports', statics.join('\n'))
245
- .replaceAll('// script', scriptContent ?? '')
246
- .replaceAll('// inners', body.join('\n'));
243
+ // Use split/join instead of replaceAll to avoid $ being interpreted
244
+ // as special replacement patterns (e.g. $` inserts pre-match string)
245
+ code = code.split('// imports').join(statics.join('\n'));
246
+ code = code.split('// script').join(scriptContent ?? '');
247
+ code = code.split('// inners').join(body.join('\n'));
247
248
 
248
249
  // Transform control flow tags to JS
249
250
  code = code
@@ -5,8 +5,8 @@
5
5
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
7
  <title></title>
8
- <script src="/main.js"></script>
9
- <script src="/spa-renderer.js"></script>
8
+ <script src="/main.js" defer></script>
9
+ <script src="/spa-renderer.js" defer></script>
10
10
  </head>
11
11
  <body></body>
12
12
  </html>