mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-16 11:47:54 +01:00
mobile: fix release build
This commit is contained in:
committed by
Abdullah Atta
parent
c231c07633
commit
37eeeb1d64
@@ -2,6 +2,9 @@
|
||||
const path = require("path");
|
||||
const TerserPlugin = require("terser-webpack-plugin");
|
||||
const Repack = require("@callstack/repack");
|
||||
const { webpack, NormalModuleReplacementPlugin } = require("webpack");
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* More documentation, installation, usage, motivation and differences with Metro is available at:
|
||||
@@ -102,6 +105,9 @@ module.exports = (env) => {
|
||||
"katex": path.join(__dirname, "../node_modules/katex"),
|
||||
"tinycolor2": path.join(__dirname, "../node_modules/tinycolor2"),
|
||||
},
|
||||
fallback: {
|
||||
"crypto": false,
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Configures output.
|
||||
@@ -307,6 +313,12 @@ module.exports = (env) => {
|
||||
],
|
||||
},
|
||||
plugins: [
|
||||
new NormalModuleReplacementPlugin(
|
||||
/node:crypto/,
|
||||
(resource) => {
|
||||
resource.request = resource.request.replace(/^node:/, '');
|
||||
}
|
||||
),
|
||||
/**
|
||||
* Configure other required and additional plugins to make the bundle
|
||||
* work in React Native and provide good development experience with
|
||||
|
||||
Reference in New Issue
Block a user