mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-02-24 12:12:54 +01:00
mobile: fix webpack build
This commit is contained in:
committed by
Abdullah Atta
parent
162d16b2c7
commit
cdd3075e4f
@@ -24,7 +24,6 @@ import { AnnouncementDialog } from "../announcements";
|
||||
import AuthModal from "../auth/auth-modal";
|
||||
import { SessionExpired } from "../auth/session-expired";
|
||||
import { Dialog } from "../dialog";
|
||||
import { AddTopicDialog } from "../dialogs/add-topic";
|
||||
import JumpToSectionDialog from "../dialogs/jump-to-section";
|
||||
import { LoadingDialog } from "../dialogs/loading";
|
||||
import PDFPreview from "../dialogs/pdf-preview";
|
||||
|
||||
@@ -151,6 +151,29 @@ module.exports = (env) => {
|
||||
* https://github.com/babel/babel-loader#options
|
||||
*/
|
||||
rules: [
|
||||
{
|
||||
test: /\.mjs$|cjs$|js$|jsx$|ts$|tsx$/,
|
||||
include: [
|
||||
/node_modules(.*[/\\])+kysely/,
|
||||
],
|
||||
use: {
|
||||
loader: "babel-loader",
|
||||
options: {
|
||||
configFile: false,
|
||||
cacheDirectory: path.join(
|
||||
__dirname,
|
||||
"node_modules/.webpack-cache"
|
||||
),
|
||||
babelrc: false,
|
||||
presets: ["module:metro-react-native-babel-preset"],
|
||||
plugins: [
|
||||
"react-native-reanimated/plugin",
|
||||
"@babel/plugin-transform-named-capturing-groups-regex",
|
||||
["@babel/plugin-transform-private-methods", { "loose": true }]
|
||||
]
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
test: /\.mjs$|cjs$|js$|jsx$|ts$|tsx$/,
|
||||
include: [
|
||||
@@ -186,8 +209,6 @@ module.exports = (env) => {
|
||||
/node_modules(.*[/\\])+@trpc[/\\]react-query/,
|
||||
/node_modules(.*[/\\])+katex/,
|
||||
/node_modules(.*[/\\])+@notesnook[/\\]core/,
|
||||
/node_modules(.*[/\\])+kysely/,
|
||||
|
||||
],
|
||||
use: {
|
||||
loader: "babel-loader",
|
||||
@@ -202,18 +223,11 @@ module.exports = (env) => {
|
||||
plugins: [
|
||||
"react-native-reanimated/plugin",
|
||||
"@babel/plugin-transform-named-capturing-groups-regex",
|
||||
],
|
||||
overrides: [
|
||||
{
|
||||
test: '../node_modules/kysley',
|
||||
plugins: [
|
||||
["@babel/plugin-transform-private-methods", { "loose": true }]
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* Here you can adjust loader that will process your files.
|
||||
*
|
||||
@@ -248,6 +262,7 @@ module.exports = (env) => {
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* This loader handles all static assets (images, video, audio and others), so that you can
|
||||
* use (reference) them inside your application.
|
||||
|
||||
Reference in New Issue
Block a user