web: @notesnook-importer/core dynamic import

This commit is contained in:
Abdullah Atta
2026-08-21 12:54:51 +05:00
parent 87987c75b2
commit 2bb3d43db6
2 changed files with 4 additions and 7 deletions

View File

@@ -17,11 +17,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import {
IFileProvider,
ProviderSettings,
transform
} from "@notesnook-importer/core";
import { IFileProvider, ProviderSettings } from "@notesnook-importer/core";
import { formatBytes, getFormattedDate } from "@notesnook/common";
import { ScrollContainer } from "@notesnook/ui";
import { Button, Flex, Text } from "@theme-ui/components";
@@ -127,6 +123,8 @@ export function FileProviderHandler(props: FileProviderHandlerProps) {
done: 0
});
const { transform } = await import("@notesnook-importer/core");
errors.push(
...(await transform(
provider,

View File

@@ -69,8 +69,6 @@ export default defineConfig({
path.basename(id) !== "index.js"
)
return `code-lang-${path.basename(id, "js")}`;
else if (id.includes("notesnook-importer"))
return `notesnook-importer`;
return null;
}
}
@@ -192,6 +190,7 @@ export default defineConfig({
: [
prefetchPlugin({
excludeFn: (assetName) =>
assetName.includes("notesnook-importer") ||
assetName.includes("wa-sqlite-async") ||
!assetName.includes("wa-sqlite")
})