diff --git a/package-lock.json b/package-lock.json index e5e4cdb..6b115dd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -38,6 +38,7 @@ "@typescript-eslint/parser": "^5.45.0", "axios": "^1.2.1 || ~1.1.3", "bluebird": "^3.7.2", + "construct-style-sheets-polyfill": "^3.1.0", "eslint": "^8.28.0", "form-data": "^4.0.0", "jszip": "^3.10.1", @@ -1103,6 +1104,12 @@ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, + "node_modules/construct-style-sheets-polyfill": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/construct-style-sheets-polyfill/-/construct-style-sheets-polyfill-3.1.0.tgz", + "integrity": "sha512-HBLKP0chz8BAY6rBdzda11c3wAZeCZ+kIG4weVC2NM3AXzxx09nhe8t0SQNdloAvg5GLuHwq/0SPOOSPvtCcKw==", + "dev": true + }, "node_modules/core-util-is": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", @@ -3948,6 +3955,12 @@ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, + "construct-style-sheets-polyfill": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/construct-style-sheets-polyfill/-/construct-style-sheets-polyfill-3.1.0.tgz", + "integrity": "sha512-HBLKP0chz8BAY6rBdzda11c3wAZeCZ+kIG4weVC2NM3AXzxx09nhe8t0SQNdloAvg5GLuHwq/0SPOOSPvtCcKw==", + "dev": true + }, "core-util-is": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", diff --git a/package.json b/package.json index f6f03da..a918e9a 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,7 @@ "@typescript-eslint/parser": "^5.45.0", "axios": "^1.2.1 || ~1.1.3", "bluebird": "^3.7.2", + "construct-style-sheets-polyfill": "^3.1.0", "eslint": "^8.28.0", "form-data": "^4.0.0", "jszip": "^3.10.1", diff --git a/rollup.config.js b/rollup.config.js index fcc2394..c02977b 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -9,6 +9,7 @@ import {assetLoader} from "./build/asset-loader.mjs"; import jsonPlugin from "@rollup/plugin-json"; import cleanPlugin from "./build/clean-plugin.mjs"; import scssLoader from "./build/scss-loader.mjs"; +import {join} from "node:path"; const srcInclude = /src[\\/].+\.m?tsx?$/; const srcExclude = /node_modules[\\/]/; @@ -110,12 +111,22 @@ export default function (opts) { }, }), copyPlugin({ - copy: [{ - from: [ - 'manifest.json', - // 'public_api.d.ts', - ] - }], + copy: [ + { + from: [ + 'manifest.json', + // 'public_api.d.ts', + ] + }, + { + from: 'adoptedStyleSheets.js', + opts: { + glob: { + cwd: join(process.cwd(), 'node_modules', 'construct-style-sheets-polyfill', 'dist'), + }, + }, + } + ], defaultOpts: { glob: {cwd: 'src'}, emitNameKind: 'fileName', diff --git a/src/manifest.json b/src/manifest.json index 8793476..ed0a0d3 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -2,6 +2,7 @@ "namespace": "ActionWorkflows", "setup": "setup.mjs", "load": [ + "adoptedStyleSheets.js", "styles.css" ] }