@rollup/plugin-commonjs 19.0.2 → 20.0.0
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/CHANGELOG.md +8 -0
- package/dist/index.es.js +2 -3
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { basename, extname, dirname,
|
|
1
|
+
import { basename, extname, dirname, join, resolve, sep } from 'path';
|
|
2
2
|
import { makeLegalIdentifier, attachScopes, extractAssignedNames, createFilter } from '@rollup/pluginutils';
|
|
3
3
|
import getCommonDir from 'commondir';
|
|
4
4
|
import { existsSync, readFileSync, statSync } from 'fs';
|
|
@@ -366,8 +366,7 @@ function getName(id) {
|
|
|
366
366
|
if (name !== 'index') {
|
|
367
367
|
return name;
|
|
368
368
|
}
|
|
369
|
-
|
|
370
|
-
return makeLegalIdentifier(segments[segments.length - 1]);
|
|
369
|
+
return makeLegalIdentifier(basename(dirname(id)));
|
|
371
370
|
}
|
|
372
371
|
|
|
373
372
|
function normalizePathSlashes(path) {
|