Skip to content

Commit

Permalink
client: remove plugin-legacy
Browse files Browse the repository at this point in the history
Could consider adding it back when vitejs/vite#6535 is merged
  • Loading branch information
wuzzeb committed Mar 11, 2022
1 parent a59c280 commit 4cd91f8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 39 deletions.
1 change: 0 additions & 1 deletion client/insight/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
"@types/react-dom": "^17.0.13",
"@typescript-eslint/eslint-plugin": "^5.14.0",
"@typescript-eslint/parser": "^5.14.0",
"@vitejs/plugin-legacy": "^1.7.1",
"@vitejs/plugin-react": "^1.2.0",
"eslint": "^8.10.0",
"eslint-config-prettier": "^8.5.0",
Expand Down
37 changes: 2 additions & 35 deletions client/insight/pnpm-lock.yaml

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

3 changes: 1 addition & 2 deletions client/insight/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
/// <reference types="vite/client" />
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import legacy from "@vitejs/plugin-legacy";

export default defineConfig({
root: "src",
plugins: [react(), legacy({ targets: ["defaults", "not IE 11", "edge 18"] })],
plugins: [react()],
base: "/",
server: {
port: 1234,
Expand Down
2 changes: 1 addition & 1 deletion server/lib/BlackMaple.MachineFramework/http/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ public void Configure(
context.Response.Headers.Add("Content-Security-Policy",
"default-src 'self'; style-src 'self' 'unsafe-inline'; connect-src *; base-uri 'self'; form-action 'self'; font-src 'self' data:; manifest-src 'self' data:; " +
// https://github.com/vitejs/vite/tree/main/packages/plugin-legacy#content-security-policy
"script-src 'self' 'sha256-tQjf8gvb2ROOMapIxFvFAYBeUJ0v1HCbOcSmDNXGtDo=' 'sha256-MS6/3FCg4WjP9gwgaBGwLpRCY6fZBgwmhVCdrPrNf3E=' 'sha256-T9h4ixy0FtNsCwAyTfBtIY6uV5ZhMeNQIlL42GAKEME='"
"script-src 'self';"
);
context.Response.Headers.Add("Cross-Origin-Embedder-Policy", "require-corp");
context.Response.Headers.Add("Cross-Origin-Opener-Policy", "same-origin");
Expand Down

0 comments on commit 4cd91f8

Please sign in to comment.