forked from parcel-bundler/parcel
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove
if (value)
check from HTMLAsset's generate() for script tags
Script tags don't need to have inner content, and so this check was excluding non-inline script tags from being included in the HTMLAsset's ast for transforming script tags. This meant they were all being output the same as in the source HTML. This should now strip `type` attributes for 'application/javascript', 'text/javascript', and 'module'. Also remove superfluous static content & dev code for this test.
- Loading branch information
Showing
5 changed files
with
30 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
packages/core/integration-tests/test/integration/html-module-type-scripts/module.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +0,0 @@ | ||
var a = 1 | ||
1 change: 0 additions & 1 deletion
1
packages/core/integration-tests/test/integration/html-module-type-scripts/text-javascript.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +0,0 @@ | ||
var b = 2 | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters