Skip to content

Commit be4bee9

Browse files
authored
v222_bugfix (#25)
1 parent 1d1e414 commit be4bee9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ const buildInjectCode = (injectToSelector = 'head', css, digest, { urlFullPathMa
7373
root = document.head;
7474
console.warn('[esbuild-css-modules-plugin]', 'can not find element \`${injectToSelector}\`, append style to', root);
7575
}
76-
if (!root.getElementById('${digest}')) {
76+
if (!root.querySelector('#${digest}')) {
7777
const el = document.createElement('style');
7878
el.id = '${digest}';
7979
el.textContent = css;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "esbuild-css-modules-plugin",
3-
"version": "2.2.1",
3+
"version": "2.2.2",
44
"description": "A esbuild plugin to bundle css modules into js(x)/ts(x).",
55
"main": "index.js",
66
"keywords": [

0 commit comments

Comments
 (0)