Skip to content

Commit

Permalink
feat(FEC-14380): add nonce to style tags (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
lianbenjamin authored Mar 3, 2025
1 parent f5983d4 commit f820192
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
"eslint-plugin-mocha-no-only": "^1.1.0",
"eslint-plugin-prettier": "^3.1.4",
"flow-bin": "^0.129.0",
"humanize-duration": "^3.32.1",
"prettier": "^2.0.5",
"sass": "^1.52.3",
"sass-loader": "^12.6.0",
Expand All @@ -89,8 +90,7 @@
"uglifyjs-webpack-plugin": "^2.2.0",
"webpack": "^5.72.1",
"webpack-cli": "^4.9.2",
"webpack-dev-server": "^4.9.0",
"humanize-duration": "^3.32.1"
"webpack-dev-server": "^4.9.0"
},
"peerDependencies": {
"@playkit-js/kaltura-player-js": "latest"
Expand All @@ -107,6 +107,7 @@
"name": "timeline"
},
"dependencies": {
"@playkit-js/common": "^1.2.12"
"@playkit-js/common": "^1.2.12",
"@playkit-js/webpack-common": "^1.0.1-canary.0-dfd24a9"
}
}
9 changes: 8 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
const webpack = require('webpack');
const path = require('path');
const packageData = require('./package.json');
const {insertStylesWithNonce} = require('@playkit-js/webpack-common');

const plugins = [
new webpack.DefinePlugin({
Expand Down Expand Up @@ -62,7 +63,13 @@ module.exports = {
test: /\.scss$/,
use: [
{
loader: 'style-loader'
loader: 'style-loader',
options: {
attributes: {
id: `${packageData.name}`
},
insert: insertStylesWithNonce
}
},
{
loader: 'css-loader',
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1164,6 +1164,11 @@
js-logger "^1.6.0"
ua-parser-js "^1.0.36"

"@playkit-js/webpack-common@^1.0.1-canary.0-dfd24a9":
version "1.0.1-canary.0-dfd24a9"
resolved "https://registry.yarnpkg.com/@playkit-js/webpack-common/-/webpack-common-1.0.1-canary.0-dfd24a9.tgz#e1760b4c10f789c62bfd29a73d873d547b52a25c"
integrity sha512-/dlxA7iKF5/SW9Y282THjFRWW0SjKugg4XZgL6OLdfSvAUKcfNXmtSjiqjDBpcrZP51288DyJhOj2+0Tp+R39A==

"@sindresorhus/is@^0.7.0":
version "0.7.0"
resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.7.0.tgz#9a06f4f137ee84d7df0460c1fdb1135ffa6c50fd"
Expand Down

0 comments on commit f820192

Please sign in to comment.