flow like the river
This commit is contained in:
commit
013fe673f3
42435 changed files with 5764238 additions and 0 deletions
14
BACK_BACK/node_modules/parcel-bundler/lib/utils/getModuleParts.js
generated
vendored
Executable file
14
BACK_BACK/node_modules/parcel-bundler/lib/utils/getModuleParts.js
generated
vendored
Executable file
|
|
@ -0,0 +1,14 @@
|
|||
"use strict";
|
||||
|
||||
const path = require('path');
|
||||
|
||||
module.exports = function (name) {
|
||||
let parts = path.normalize(name).split(path.sep);
|
||||
|
||||
if (parts[0].charAt(0) === '@') {
|
||||
// Scoped module (e.g. @scope/module). Merge the first two parts back together.
|
||||
parts.splice(0, 2, `${parts[0]}/${parts[1]}`);
|
||||
}
|
||||
|
||||
return parts;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue