trunk-rs/trunk

Avoiding inline script tag in built index.html

Ouverte

#288 ouverte le 24 déc. 2021

 (9 commentaires) (4 réactions) (0 personne assignée)Rust (315 forks)auto 404
enhancementhelp wanted

Métriques du dépôt

Stars
 (4 347 étoiles)
Métriques de merge PR
 (Métriques PR en attente)

Description

It would be great if it was possible to avoid having the

import init from '/index-....js';init('/index-..._bg.wasm');

part of the html in a separate file and load it as a module, similar to React's INLINE_RUNTIME_CHUNK=false

This is so allowing script-src 'unsafe-inline' can be avoided when setting Content Security Policy headers.

Guide contributeur