Skip to content

Commit

Permalink
Merge pull request #1510 from belemaire/fix-ern-dev
Browse files Browse the repository at this point in the history
Fix ern dev version issue
  • Loading branch information
belemaire authored Feb 29, 2020
2 parents c794fee + 2bef8c1 commit 0b4f1e3
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions ern-local-cli/src/index.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@ const path = require('path')
const Module = require('module')
const oload = Module._load

const workspacePath = path.resolve(__dirname, '../..')

process.env.ERN_ENV = 'development'
process.env.TS_NODE_PROJECT = path.resolve(
__dirname,
'..',
'..',
'tsconfig.json'
)
process.env.TS_NODE_PROJECT = path.resolve(workspacePath, 'tsconfig.json')

let tsNodeSourceMapSupportModule
Module._load = function(file, parent) {
Expand All @@ -23,6 +20,9 @@ Module._load = function(file, parent) {
}
}

require('tsconfig-paths/register')
require('ts-node').register({ transpileOnly: true })
require(path.normalize(`${workspacePath}/node_modules/tsconfig-paths/register`))
require(path.normalize(`${workspacePath}/node_modules/ts-node`)).register({
dir: workspacePath,
transpileOnly: true,
})
require('./index.ts')

0 comments on commit 0b4f1e3

Please sign in to comment.