Skip to content

Commit

Permalink
fix(FEC-14000): css-loader create multiple styles tags
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanTGold committed Jun 16, 2024
1 parent 1fa0771 commit f1ad62a
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const webpack = require('webpack');
const path = require('path');
const packageData = require('./package.json');
const CSS_MODULE_PREFIX = 'playkit';

module.exports = (env, { mode }) => {
return {
Expand Down Expand Up @@ -35,13 +36,19 @@ module.exports = (env, { mode }) => {
{
test: /\.scss/,
use: [
'style-loader',
{
loader: 'style-loader',
options: {
attributes: {id: `${packageData.name}`},
injectType: "singletonStyleTag"
}
},
{
loader: 'css-loader',
options: {
esModule: true,
modules: {
localIdentName: '[local]',
localIdentName: `${CSS_MODULE_PREFIX}-plx-[local]`,
namedExport: true
}
}
Expand Down

0 comments on commit f1ad62a

Please sign in to comment.