Skip to content

Commit

Permalink
build: fix imports for build process
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronm-2112 committed Dec 1, 2023
1 parent 481c160 commit c765b3b
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 8 deletions.
8 changes: 7 additions & 1 deletion src/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,13 @@ const initialize = () => {
})

// TODO: Add dev check for this path
splashScreen.loadURL(process.env['ELECTRON_RENDERER_URL'] + "/splash/splash-screen.html")
// HMR for renderer base on electron-vite cli.
// Load the remote URL for development or the local html file for production.
if (is.dev && process.env['ELECTRON_RENDERER_URL']) {
splashScreen.loadURL(process.env['ELECTRON_RENDERER_URL'] + "/splash/splash-screen.html")
} else {
splashScreen.loadFile(join(__dirname, '../renderer/public/splash/splash-screen.html'))
}


splashScreen.once("ready-to-show", () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import lottie from "lottie-web"
import {dragDrop, successCheck, errorMark} from '../../assets/lotties/lotties'
import kombuchaEnums from '../analytics/analytics-enums'
import Swal from "sweetalert2"
import Tagify from "@yaireo/tagify";
import * as Tagify from "@yaireo/tagify";
import tippy from "tippy.js";
import client from '../client'
import jQuery from 'jquery'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import client from '../client'
import kombuchaEnums from "../analytics/analytics-enums";
import createEventDataPrepareMetadata from "../analytics/prepare-metadata-analytics";
import api from "../others/api/api"
import Tagify from "@yaireo/tagify";
import * as Tagify from "@yaireo/tagify";



Expand Down
2 changes: 1 addition & 1 deletion src/renderer/src/scripts/metadata-files/submission.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ This file contains all of the functions related to the submission.xlsx file
*/
import Swal from "sweetalert2";
import introJs from "intro.js";
import checkDiskSpace from "check-disk-space";
// import checkDiskSpace from "check-disk-space";
import {clientError, userErrorMessage} from '../others/http-error-handler/error-handler'
import client from '../client'
import kombuchaEnums from "../analytics/analytics-enums";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Swal from "sweetalert2";
import checkDiskSpace from "check-disk-space";
// import checkDiskSpace from "check-disk-space";
import { updateDatasetList } from "../globals"
import determineDatasetLocation, { Destinations } from "../analytics/analytics-utils"
import {clientError, userErrorMessage} from '../others/http-error-handler/error-handler'
Expand Down
6 changes: 3 additions & 3 deletions src/renderer/src/scripts/others/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import * as path from "path";
import Editor from "@toast-ui/editor"
// const remote = require("@electron/remote");
import { Notyf } from "notyf"
import Tagify from "@yaireo/tagify";
import * as Tagify from "@yaireo/tagify";
// const https = require("https");
// const electron = require("electron");
import jQuery from 'jquery'
Expand All @@ -25,12 +25,12 @@ import csvToJson from "convert-csv-to-json";
import tippy from "tippy.js";
import introJs from "intro.js";
// import selectpicker from "bootstrap-select";
import diskCheck from "check-disk-space";
// import diskCheck from "check-disk-space";
import validator from "validator";
import doiRegex from "doi-regex";
import lottie from "lottie-web";
import { dragDrop, successCheck } from '../../assets/lotties/lotties'
import select2 from "select2"; // TODO: select2()
import * as select2 from "select2"; // TODO: select2()
select2()
import autoComplete from "@tarekraafat/autocomplete.js/dist/autoComplete.min.js"
import Cropper from 'cropperjs'
Expand Down

0 comments on commit c765b3b

Please sign in to comment.