-
-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'fix/resolve-monorepo-assets-paths' into feat/merges
* fix/resolve-monorepo-assets-paths: [fix] resolve paths in monorepo projects # Conflicts: # packages/rnv/pluginTemplates/react-native/[email protected]
- Loading branch information
Showing
2 changed files
with
42 additions
and
1 deletion.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
...plates/@react-native-community/cli/overrides/build/commands/bundle/getAssetDestPathIOS.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
"use strict"; | ||
|
||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = void 0; | ||
|
||
function _path() { | ||
const data = _interopRequireDefault(require("path")); | ||
|
||
_path = function () { | ||
return data; | ||
}; | ||
|
||
return data; | ||
} | ||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
|
||
/** | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
*/ | ||
function getAssetDestPathIOS(asset, scale) { | ||
const suffix = scale === 1 ? '' : `@${scale}x`; | ||
const fileName = `${asset.name + suffix}.${asset.type}`; | ||
|
||
return _path().default.join( | ||
asset.httpServerLocation.substr(1).replace(/\.\.\//g, '_'), | ||
fileName, | ||
); | ||
} | ||
|
||
var _default = getAssetDestPathIOS; | ||
exports.default = _default; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters