mirror of
https://github.com/oceanprotocol-archive/squid-js.git
synced 2024-02-02 15:31:51 +01:00
Add consume support for browsers.
This commit is contained in:
parent
9a252d7731
commit
dde934543c
@ -131,6 +131,7 @@ export class Brizo extends Instantiable {
|
||||
}
|
||||
|
||||
private async downloadFile(url: string, destination?: string): Promise<string> {
|
||||
if (destination) {
|
||||
const response = await WebServiceConnectorProvider
|
||||
.getConnector()
|
||||
.get(url)
|
||||
@ -146,5 +147,8 @@ export class Brizo extends Instantiable {
|
||||
});
|
||||
|
||||
return destination
|
||||
} else {
|
||||
window.open(url, '_blank')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,8 @@
|
||||
"lib": [
|
||||
"es2017",
|
||||
"es6",
|
||||
"es7"
|
||||
"es7",
|
||||
"DOM"
|
||||
],
|
||||
"declaration": true,
|
||||
"module": "commonjs",
|
||||
|
@ -9,6 +9,9 @@ module.exports = {
|
||||
minimize: true,
|
||||
noEmitOnErrors: true
|
||||
},
|
||||
node: {
|
||||
fs: 'empty',
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['.js'],
|
||||
modules: ['node_modules'],
|
||||
|
Loading…
Reference in New Issue
Block a user