trunk-rs/trunk

Avoiding inline script tag in built index.html

オープン

#288 opened on 2021/12/24

 (9 件のコメント) (4 件のリアクション) (0 人の担当者)Rust (315 件のフォーク)auto 404
enhancementhelp wanted

Repository metrics

Stars
 (4,347 個のスター)
PR merge metrics
 (PR metrics pending)

説明

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.

コントリビューターガイド