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

Support overriding <script type={}> #255

Closed
wants to merge 1 commit into from
Closed

Support overriding <script type={}> #255

wants to merge 1 commit into from

Conversation

EricRabil
Copy link

@EricRabil EricRabil commented Jan 7, 2021

This enables Django sites to render both <script type="module"> and <script nomodule> tags using this library.

Used as such:

{% render_bundle 'main' jsType='module' %}
{% render_bundle 'main' config='legacy' attrs='nomodule' %}

@fjsj fjsj self-assigned this Apr 22, 2021
@andersk
Copy link

andersk commented Apr 30, 2021

Can we just get rid of the type="text/javascript" (#152, #170)? It’s unnecessary and even discouraged by the specification: “Authors should omit the type attribute instead of redundantly setting it.” It causes the validator to raise warnings, too.

Then a user could set type="module" using the existing attrs mechanism.

@fjsj fjsj removed their assignment Jul 15, 2021
@fjsj
Copy link
Member

fjsj commented Sep 24, 2021

Fixed by #170

@fjsj fjsj closed this Sep 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants