@plumeria/next-plugin 14.1.0 → 14.1.2
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 +19 -6
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -37,12 +37,25 @@ exports.withPlumeria = withPlumeria;
|
|
|
37
37
|
const fs = __importStar(require("fs"));
|
|
38
38
|
const isRuleConfigItem = (rule) => !Array.isArray(rule) && typeof rule === 'object' && rule !== null;
|
|
39
39
|
function withPlumeria(nextConfig = {}) {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
40
|
+
const globalRef = global;
|
|
41
|
+
if (process.env.NODE_ENV === 'development' &&
|
|
42
|
+
!globalRef.__PLUMERIA_RESET_DONE__) {
|
|
43
|
+
globalRef.__PLUMERIA_RESET_DONE__ = true;
|
|
44
|
+
try {
|
|
45
|
+
const VIRTUAL_FILE_PATH = require.resolve('@plumeria/turbopack-loader/zero-virtual.css');
|
|
46
|
+
const LOCK_DIR_PATH = VIRTUAL_FILE_PATH + '.lock';
|
|
47
|
+
if (fs.existsSync(LOCK_DIR_PATH)) {
|
|
48
|
+
try {
|
|
49
|
+
fs.rmdirSync(LOCK_DIR_PATH);
|
|
50
|
+
}
|
|
51
|
+
catch (e) {
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
fs.writeFileSync(VIRTUAL_FILE_PATH, '/** Placeholder file */\n', 'utf-8');
|
|
55
|
+
}
|
|
56
|
+
catch (e) {
|
|
57
|
+
console.error('Failed to reset Plumeria virtual CSS file:', e);
|
|
58
|
+
}
|
|
46
59
|
}
|
|
47
60
|
const originalWebpack = nextConfig.webpack;
|
|
48
61
|
const turbopackLoaders = [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plumeria/next-plugin",
|
|
3
|
-
"version": "14.1.
|
|
3
|
+
"version": "14.1.2",
|
|
4
4
|
"description": "Plumeria Next.js plugin",
|
|
5
5
|
"author": "Refirst 11",
|
|
6
6
|
"license": "MIT",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"dist/"
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@plumeria/turbopack-loader": "^14.1.
|
|
32
|
+
"@plumeria/turbopack-loader": "^14.1.2"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"next": "^16.2.9",
|