jscrambler-metro-plugin 8.4.15 → 8.4.17
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/README.md +9 -1
- package/lib/sourceMaps.js +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
@@ -50,4 +50,12 @@ the usual `.jscramblerrc` file.
|
|
50
50
|
If you use a different location for the `.jscramblerignore` file, you can use the `ignoreFile` option to tell Jscrambler the path to the file.
|
51
51
|
Otherwise, if a `.jscramblerignore` file is found in a project root folder, it will be considered. You can find more information and examples in Ignoring Files.
|
52
52
|
|
53
|
-
By default, Jscrambler protection is **ignored** when bundle mode is set for **Development**. You can override this behavior by setting env variable `JSCRAMBLER_METRO_DEV=true`
|
53
|
+
By default, Jscrambler protection is **ignored** when bundle mode is set for **Development**. You can override this behavior by setting env variable `JSCRAMBLER_METRO_DEV=true`
|
54
|
+
|
55
|
+
In order to activate source map generation effectively, you will need to enable source maps both in the Jscrambler configuration file, by adding the following parameter to said file:
|
56
|
+
|
57
|
+
...
|
58
|
+
"sourceMaps": true,
|
59
|
+
...
|
60
|
+
|
61
|
+
and in the [React Native app](https://reactnative.dev/docs/debugging-release-builds?platform=android#enabling-source-maps).
|
package/lib/sourceMaps.js
CHANGED
@@ -138,9 +138,9 @@ module.exports = async function generateSourceMaps(payload) {
|
|
138
138
|
/* vendor code */
|
139
139
|
newMappings[0].generated.line += shiftLines;
|
140
140
|
|
141
|
-
//
|
142
|
-
//
|
143
|
-
if (
|
141
|
+
// when the original line/column can't be found, it means that there isn't a real source file associated.
|
142
|
+
// Thus, if source file name exists it must be cleaned (f.e ".") to avoid an invalid mapping error
|
143
|
+
if (newMappings[0].original === null && newMappings[0].source) {
|
144
144
|
newMappings[0].source = null;
|
145
145
|
}
|
146
146
|
}
|