push external import in localhost as well

pull/947/head
yann300 4 years ago committed by GitHub
parent cb6739964c
commit 1492f10a88
  1. 2
      apps/remix-ide/src/app/compiler/compiler-imports.js
  2. 6
      apps/remix-ide/src/app/files/remixDProvider.js

@ -88,7 +88,7 @@ module.exports = class CompilerImports extends Plugin {
(error, content, cleanUrl, type, url) => {
if (error) return cb(error)
if (this.fileManager) {
const workspace = this.fileManager.getProvider('workspace')
const workspace = this.fileManager.currentFileProvider()
const path = targetPath || type + '/' + cleanUrl
if (workspace) workspace.addExternal(path, content, url)
}

@ -1,11 +1,11 @@
'use strict'
var EventManager = require('../../lib/events')
const FileProvider = require('./fileProvider')
module.exports = class RemixDProvider {
module.exports = class RemixDProvider extends FileProvider {
constructor (appManager) {
this.event = new EventManager()
super('localhost')
this._appManager = appManager
this.type = 'localhost'
this.error = { EEXIST: 'File already exists' }
this._isReady = false
this._readOnlyFiles = {}

Loading…
Cancel
Save