Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update blank templates #3537

Merged
merged 4 commits into from Aug 3, 2021
Merged

Update blank templates #3537

merged 4 commits into from Aug 3, 2021

Conversation

awu43
Copy link
Contributor

@awu43 awu43 commented Jul 4, 2021

Changes

A fix and some other changes:

  • Duplicate <img> has been deleted from blank-typescript template
  • Comment line about an empty page has been deleted
  • <script> elements have been moved to head and defer attributes have been added.

Testing

Updated snapshots.

Docs

N/A, no user action required.

@changeset-bot
Copy link

changeset-bot bot commented Jul 4, 2021

⚠️ No Changeset found

Latest commit: 5ee210e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Jul 4, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/pikapkg/snowpack/HnM7pSWw2EivdWgsmJjEKbM47wNb
✅ Preview: https://snowpack-git-fork-awu43-update-blank-templates-pikapkg.vercel.app

@@ -6,6 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="Web site created using create-snowpack-app" />
<link rel="stylesheet" type="text/css" href="/dist/index.css" />
<script type="module" src="/dist/index.js" defer></script>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "defer" attribute can be removed since modules defer automatically. Per https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules#other_differences_between_modules_and_standard_scripts

There is no need to use the defer attribute when loading a module script; modules are deferred automatically.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to know, but @snowpack/plugin-webpack removes type="module" from the final build so defer is still necessary here.

@@ -6,10 +6,10 @@
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="Web site created using create-snowpack-app" />
<link rel="stylesheet" type="text/css" href="/dist/index.css" />
<script type="module" src="/dist/index.js" defer></script>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As commented above, no need for "defer"

@drwpow drwpow merged commit 750d190 into FredKSchott:main Aug 3, 2021
@awu43 awu43 deleted the update-blank-templates branch August 6, 2021 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants