@windwalker-io/core 4.2.3 → 4.2.4
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/next.js
CHANGED
|
@@ -348,8 +348,8 @@ class JsModulizeProcessor {
|
|
|
348
348
|
fs$1.ensureDirSync(tmpPath);
|
|
349
349
|
for (const result of bladeScripts) {
|
|
350
350
|
let key = result.as;
|
|
351
|
-
const filename = result.path.replace(/\\|\//g, "_");
|
|
352
|
-
const tmpFile = tmpPath + "/" + filename + ".ts";
|
|
351
|
+
const filename = result.path.split(/\\|\//g).pop().replace(/\\|\//g, "_");
|
|
352
|
+
const tmpFile = tmpPath + "/" + filename + "__" + result.as.replace(/\./g, "-") + ".ts";
|
|
353
353
|
if (!fs$1.existsSync(tmpFile) || fs$1.readFileSync(tmpFile, "utf8") !== result.code) {
|
|
354
354
|
fs$1.writeFileSync(tmpFile, result.code);
|
|
355
355
|
}
|
package/package.json
CHANGED
|
@@ -132,8 +132,12 @@ export class JsModulizeProcessor implements ProcessorInterface {
|
|
|
132
132
|
|
|
133
133
|
for (const result of bladeScripts) {
|
|
134
134
|
let key = result.as;
|
|
135
|
-
const filename = result.path
|
|
136
|
-
|
|
135
|
+
const filename = result.path
|
|
136
|
+
.split(/\\|\//g)
|
|
137
|
+
.pop()
|
|
138
|
+
.replace(/\\|\//g, '_');
|
|
139
|
+
|
|
140
|
+
const tmpFile = tmpPath + '/' + filename + '__' + result.as.replace(/\./g, '-') + '.ts';
|
|
137
141
|
|
|
138
142
|
if (!fs.existsSync(tmpFile) || fs.readFileSync(tmpFile, 'utf8') !== result.code) {
|
|
139
143
|
fs.writeFileSync(tmpFile, result.code);
|