@plumeria/turbopack-loader 19.5.0 → 19.5.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 +4 -4
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -63,7 +63,7 @@ async function generateProductionCss(virtualFilePath, options) {
|
|
|
63
63
|
withoutLogicalProperties: options.withoutLogicalProperties,
|
|
64
64
|
withoutPhysicalProperties: options.withoutPhysicalProperties,
|
|
65
65
|
});
|
|
66
|
-
const optimized =
|
|
66
|
+
const optimized = (0, compiler_1.optimizer)(css);
|
|
67
67
|
const tempPath = `${virtualFilePath}.${process.pid}.tmp`;
|
|
68
68
|
fs.writeFileSync(tempPath, `${GENERATED_MARKER}\n${optimized}`, 'utf-8');
|
|
69
69
|
fs.renameSync(tempPath, virtualFilePath);
|
|
@@ -98,7 +98,7 @@ async function loader(source) {
|
|
|
98
98
|
try {
|
|
99
99
|
this.clearDependencies();
|
|
100
100
|
this.addDependency(resourcePath);
|
|
101
|
-
const { code: transformedSource, sheets: extractedSheets } =
|
|
101
|
+
const { code: transformedSource, sheets: extractedSheets } = (0, compiler_1.transformSource)({
|
|
102
102
|
source,
|
|
103
103
|
moduleId: resourcePath,
|
|
104
104
|
filePath: resourcePath,
|
|
@@ -109,7 +109,6 @@ async function loader(source) {
|
|
|
109
109
|
collectOndemandSheets: !isProduction,
|
|
110
110
|
addDependency: (depPath) => this.addDependency(depPath),
|
|
111
111
|
});
|
|
112
|
-
const optInCSS = await (0, compiler_1.optimizer)(extractedSheets.join(''));
|
|
113
112
|
let relativeImportPath = path.relative(path.dirname(resourcePath), VIRTUAL_FILE_PATH);
|
|
114
113
|
relativeImportPath = relativeImportPath.replace(/\\/g, '/');
|
|
115
114
|
if (!relativeImportPath.startsWith('.')) {
|
|
@@ -121,6 +120,7 @@ async function loader(source) {
|
|
|
121
120
|
return callback(null, transformedSource + postfix);
|
|
122
121
|
}
|
|
123
122
|
if (extractedSheets.length > 0 && process.env.NODE_ENV === 'development') {
|
|
123
|
+
const optInCSS = (0, compiler_1.optimizer)(extractedSheets.join(''));
|
|
124
124
|
const LOCK_DIR_PATH = VIRTUAL_FILE_PATH + '.lock';
|
|
125
125
|
await (0, file_lock_1.acquireLock)(LOCK_DIR_PATH);
|
|
126
126
|
let currentCss = '';
|
|
@@ -141,7 +141,7 @@ async function loader(source) {
|
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
if (hasNewRule) {
|
|
144
|
-
const nextCss =
|
|
144
|
+
const nextCss = (0, compiler_1.optimizer)(Array.from(ruleSet).join('\n\n'));
|
|
145
145
|
fs.writeFileSync(VIRTUAL_FILE_PATH, nextCss, 'utf-8');
|
|
146
146
|
}
|
|
147
147
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plumeria/turbopack-loader",
|
|
3
|
-
"version": "19.5.
|
|
3
|
+
"version": "19.5.1",
|
|
4
4
|
"description": "Plumeria Turbopack-loader",
|
|
5
5
|
"author": "Refirst 11",
|
|
6
6
|
"license": "MIT",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"zero-virtual.css"
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@plumeria/compiler": "19.5.
|
|
32
|
+
"@plumeria/compiler": "19.5.1"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"zss-engine": "2.8.0"
|