-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
280d63d
commit feae3d9
Showing
8 changed files
with
3,767 additions
and
6,076 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,13 @@ | ||
{ | ||
"presets": ["env", "react"] | ||
"presets": [ | ||
["@babel/preset-env", { | ||
"targets": { | ||
"browsers": [ | ||
">0.25%", | ||
"not ie 11", | ||
"not op_mini all" | ||
] | ||
} | ||
}], "@babel/preset-react", | ||
] | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,18 @@ | ||
import * as JsStore from "jsstore"; | ||
import * as SqlWeb from 'sqlweb'; | ||
import * as JsStore from 'jsstore'; | ||
import * as SqlWeb from "sqlweb"; | ||
const getWorkerPath = () => { | ||
if (process.env.NODE_ENV === 'development') { | ||
return require("file-loader?name=scripts/[name].[hash].js!jsstore/dist/jsstore.worker.js"); | ||
} | ||
else { | ||
return require("file-loader?name=scripts/[name].[hash].js!jsstore/dist/jsstore.worker.min.js"); | ||
} | ||
}; | ||
|
||
JsStore.useSqlWeb(SqlWeb); | ||
const Worker = require("worker-loader?publicPath=/&name=jsstore.worker.js!jsstore/dist/jsstore.worker.min"); | ||
|
||
// This will ensure that we are using only one instance. | ||
// Otherwise due to multiple instance multiple worker will be created. | ||
export const idbCon = new JsStore.Instance(new Worker()); | ||
const workerPath = getWorkerPath(); | ||
const worker = new Worker(workerPath); | ||
export const idbCon = new JsStore.Instance(worker); |
Oops, something went wrong.