Skip to content

Commit

Permalink
fix: add constructable stylesheets polyfill
Browse files Browse the repository at this point in the history
  • Loading branch information
Alorel committed Nov 28, 2022
1 parent 978f651 commit 3dce275
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 6 deletions.
13 changes: 13 additions & 0 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
23 changes: 17 additions & 6 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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[\\/]/;
Expand Down Expand Up @@ -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',
Expand Down
1 change: 1 addition & 0 deletions src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"namespace": "ActionWorkflows",
"setup": "setup.mjs",
"load": [
"adoptedStyleSheets.js",
"styles.css"
]
}

0 comments on commit 3dce275

Please sign in to comment.