使用范围的依赖重定向


\Dependency redirection using scopes

以下示例将允许 ./app/ 内的所有资源访问 fs:

\The following example, would allow access to fs for all resources within ./app/:

{
 "resources": {
 "./app/checked.js": {
 "cascade": true,
 "integrity": true
 }
 },
 "scopes": {
 "./app/": {
 "dependencies": {
 "fs": true
 }
 }
 }
} 

以下示例将允许访问 fs 的所有 data: 资源:

\The following example, would allow access to fs for all data: resources:

{
 "resources": {
 "data:text/javascript,import('node:fs');": {
 "cascade": true,
 "integrity": true
 }
 },
 "scopes": {
 "data:": {
 "dependencies": {
 "fs": true
 }
 }
 }
} 

AltStyle によって変換されたページ (->オリジナル) /