Skip to content

Commit 3d8c3c5

Browse files
WIP. remake devextreme build to produce ESM lib package
1 parent 8b19db4 commit 3d8c3c5

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

packages/devextreme/build/gulp/babel-plugin-add-import-extensions.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,6 @@ module.exports = function addImportExtensions() {
3535
const currentDir = path.dirname(currentFile);
3636
const resolvedPath = path.resolve(currentDir, value).replace(distPathRegExp,'js');
3737

38-
let jsFilePath = resolvedPath + '.js';
39-
40-
if ( fs.existsSync(jsFilePath)
41-
|| fs.existsSync(jsFilePath = resolvedPath + '.ts')
42-
) {
43-
const stat = fs.statSync(jsFilePath);
44-
45-
if (stat.isFile()) {
46-
source.value = value + '.js';
47-
return;
48-
}
49-
}
50-
5138
if (fs.existsSync(resolvedPath)) {
5239
const stat = fs.statSync(resolvedPath);
5340

@@ -60,6 +47,19 @@ module.exports = function addImportExtensions() {
6047
}
6148
}
6249
}
50+
51+
let jsFilePath = resolvedPath + '.js';
52+
53+
if ( fs.existsSync(jsFilePath)
54+
|| fs.existsSync(jsFilePath = resolvedPath + '.ts')
55+
) {
56+
const stat = fs.statSync(jsFilePath);
57+
58+
if (stat.isFile()) {
59+
source.value = value + '.js';
60+
return;
61+
}
62+
}
6363
}
6464

6565
source.value = value + '.js';

0 commit comments

Comments
 (0)