Skip to content

Commit

Permalink
fix: support script properity in script (#6530)
Browse files Browse the repository at this point in the history
  • Loading branch information
clChenLiang authored Nov 12, 2024
1 parent e94709b commit 982b3d8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .changeset/curvy-buttons-march.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
'@modern-js/runtime': patch
'app-docmuent': patch
'app-document': patch
---

feat: support script properties with Script
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/app-document/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "app-docmuent",
"name": "app-document",
"version": "2.9.0",
"private": true,
"scripts": {
Expand Down
3 changes: 2 additions & 1 deletion tests/integration/app-document/tests/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,13 @@ describe('test dev and build', () => {
path.join(appDir, 'dist', 'html/sub/index.html'),
'utf-8',
);

expect(
htmlWithDoc.includes('<script defer="" async="" id="script-has-id">'),
).toBe(true);
// IIFE should worked
expect(
htmlWithDoc.includes('console.log("this is a IIFE function");'),
htmlWithDoc.includes('console.log("this is a IIFE function")'),
).toBe(true);
});
});
Expand Down

0 comments on commit 982b3d8

Please sign in to comment.