diff --git a/package.json b/package.json index 9875580401..f022c99718 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "main": "src/core/index.js", "browser": { "./src/core/components/init-assets.js": false, + "./src/core/runtime/add-from-fs-nodejs.js": "./src/core/runtime/add-from-fs-browser.js", "./src/core/runtime/config-nodejs.js": "./src/core/runtime/config-browser.js", "./src/core/runtime/dns-nodejs.js": "./src/core/runtime/dns-browser.js", "./src/core/runtime/fetch-nodejs.js": "./src/core/runtime/fetch-browser.js", diff --git a/src/core/components/files-regular/add-from-fs.js b/src/core/components/files-regular/add-from-fs.js new file mode 100644 index 0000000000..409c4e8d7e --- /dev/null +++ b/src/core/components/files-regular/add-from-fs.js @@ -0,0 +1,3 @@ +'use strict' + +module.exports = (self) => require('../../runtime/add-from-fs-nodejs')(self) diff --git a/src/core/components/files-regular/index.js b/src/core/components/files-regular/index.js index ac3522758b..058d07d618 100644 --- a/src/core/components/files-regular/index.js +++ b/src/core/components/files-regular/index.js @@ -2,6 +2,7 @@ module.exports = self => ({ add: require('./add')(self), + addFromFs: require('./add-from-fs')(self), addFromStream: require('./add-from-stream')(self), addFromURL: require('./add-from-url')(self), addPullStream: require('./add-pull-stream')(self), diff --git a/src/core/runtime/add-from-fs-browser.js b/src/core/runtime/add-from-fs-browser.js new file mode 100644 index 0000000000..cc38fada82 --- /dev/null +++ b/src/core/runtime/add-from-fs-browser.js @@ -0,0 +1,3 @@ +'use strict' + +module.exports = () => null diff --git a/src/core/runtime/add-from-fs-nodejs.js b/src/core/runtime/add-from-fs-nodejs.js new file mode 100644 index 0000000000..ccacec309b --- /dev/null +++ b/src/core/runtime/add-from-fs-nodejs.js @@ -0,0 +1 @@ +'use strict'