show option with ts hh config file

pull/2188/head^2
aniket-engg 3 years ago committed by Aniket
parent 96faec1f41
commit c622470485
  1. 2
      libs/remix-ui/solidity-compiler/src/lib/logic/compileTabLogic.ts
  2. 4
      libs/remixd/src/bin/remixd.ts

@ -105,7 +105,7 @@ export class CompileTabLogic {
async isHardhatProject () {
if (this.api.getFileManagerMode() === 'localhost') {
return await this.api.fileExists('hardhat.config.js')
return await this.api.fileExists('hardhat.config.js') || await this.api.fileExists('hardhat.config.ts')
} else return false
}

@ -101,8 +101,8 @@ function errorHandler (error: any, service: string) {
sharedFolderClient.sharedFolder(program.sharedFolder)
})
// Run hardhat service if a hardhat project is shared as folder
const hardhatConfigFilePath = absolutePath('./', program.sharedFolder) + '/hardhat.config.js'
const isHardhatProject = existsSync(hardhatConfigFilePath)
const hardhatConfigFilePath = absolutePath('./', program.sharedFolder)
const isHardhatProject = existsSync(hardhatConfigFilePath + '/hardhat.config.js') || existsSync(hardhatConfigFilePath + '/hardhat.config.ts')
if (isHardhatProject) {
startService('hardhat', (ws: WS, sharedFolderClient: servicesList.Sharedfolder, error: Error) => {
if (error) {

Loading…
Cancel
Save