Skip to content

Commit

Permalink
Add subresource integrity to embed
Browse files Browse the repository at this point in the history
  • Loading branch information
asiia-trilitech committed Nov 5, 2024
1 parent 1df1f1f commit 8113b63
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions apps/embed-iframe-mainnet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"typescript": "5.5.4",
"vite": "^5.4.8",
"vite-plugin-node-polyfills": "^0.17.0",
"vite-plugin-sri": "^0.0.2",
"vite-plugin-svgr": "^4.2.0"
}
}
3 changes: 3 additions & 0 deletions apps/embed-iframe-mainnet/src/vite-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/// <reference path="../../../global.d.ts" />
/// <reference types="vite/client" />
/// <reference types="vite-plugin-svgr/client" />
2 changes: 2 additions & 0 deletions apps/embed-iframe-mainnet/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { defineConfig } from "vite";
import { nodePolyfills } from "vite-plugin-node-polyfills";
import svgr from "vite-plugin-svgr";
import path from "path";
import sri from "vite-plugin-sri";

export default defineConfig({
base: "./",
Expand All @@ -15,6 +16,7 @@ export default defineConfig({
Buffer: true,
},
}),
sri({ algorithm: "sha384" }),
],
optimizeDeps: {
esbuildOptions: {
Expand Down
1 change: 1 addition & 0 deletions apps/embed-iframe/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"typescript": "5.5.4",
"vite": "^5.4.8",
"vite-plugin-node-polyfills": "^0.17.0",
"vite-plugin-sri": "^0.0.2",
"vite-plugin-svgr": "^4.2.0"
}
}
3 changes: 3 additions & 0 deletions apps/embed-iframe/src/vite-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/// <reference path="../../../global.d.ts" />
/// <reference types="vite/client" />
/// <reference types="vite-plugin-svgr/client" />
2 changes: 2 additions & 0 deletions apps/embed-iframe/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
import { nodePolyfills } from "vite-plugin-node-polyfills";
import svgr from "vite-plugin-svgr";
import sri from "vite-plugin-sri";

export default defineConfig({
base: "./",
Expand All @@ -14,6 +15,7 @@ export default defineConfig({
Buffer: true,
},
}),
sri({ algorithm: "sha384" }),
],
optimizeDeps: {
esbuildOptions: {
Expand Down
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8113b63

Please sign in to comment.