@plumeria/turbopack-loader 9.0.4 → 9.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +15 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1200,7 +1200,21 @@ async function loader(source) {
|
|
|
1200
1200
|
return callback(null, transformedSource);
|
|
1201
1201
|
}
|
|
1202
1202
|
if (extractedSheets.length > 0 && process.env.NODE_ENV === 'development') {
|
|
1203
|
-
|
|
1203
|
+
const newCss = optInCSS + '\n';
|
|
1204
|
+
let currentCss = '';
|
|
1205
|
+
try {
|
|
1206
|
+
currentCss = fs.readFileSync(VIRTUAL_FILE_PATH, 'utf-8');
|
|
1207
|
+
}
|
|
1208
|
+
catch (e) {
|
|
1209
|
+
}
|
|
1210
|
+
if (!currentCss.includes(optInCSS)) {
|
|
1211
|
+
if (currentCss) {
|
|
1212
|
+
fs.writeFileSync(VIRTUAL_FILE_PATH, currentCss + newCss, 'utf-8');
|
|
1213
|
+
}
|
|
1214
|
+
else {
|
|
1215
|
+
fs.writeFileSync(VIRTUAL_FILE_PATH, newCss, 'utf-8');
|
|
1216
|
+
}
|
|
1217
|
+
}
|
|
1204
1218
|
}
|
|
1205
1219
|
return callback(null, transformedSource + postfix);
|
|
1206
1220
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plumeria/turbopack-loader",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.1.1",
|
|
4
4
|
"description": "Plumeria Turbopack-loader",
|
|
5
5
|
"author": "Refirst 11",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"zero-virtual.css"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@plumeria/utils": "^9.
|
|
25
|
+
"@plumeria/utils": "^9.1.1"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@swc/core": "1.15.18",
|