I'm building a base express.js project with angular, and I have a server directory with a bunch of typescript files, that are processed with gulp-typescript, the thing is that seems the compilation process is run fine, but then I run a development server I getting this error:
/home/romel/Desktop/ng-express-base/dist/server/development.js:2
import * as __server from './app';
^
SyntaxError: Unexpected token *
at new Script (vm.js:80:7)
at createScript (vm.js:264:10)
at Object.runInThisContext (vm.js:316:10)
at Module._compile (internal/modules/cjs/loader.js:670:28)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:718:10)
at Module.load (internal/modules/cjs/loader.js:605:32)
at tryModuleLoad (internal/modules/cjs/loader.js:544:12)
at Function.Module._load (internal/modules/cjs/loader.js:536:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:760:12)
at startup (internal/bootstrap/node.js:303:19)
Expected behavior:import replaced by 'require' Actual behavior:import's are keep in the compiled javascript files.
I'm building a base express.js project with angular, and I have a server directory with a bunch of typescript files, that are processed with gulp-typescript, the thing is that seems the compilation process is run fine, but then I run a development server I getting this error:
Expected behavior:
import
replaced by 'require'Actual behavior:
import
's are keep in the compiled javascript files.Your gulpfile: https://github.com/romelgomez/ng-express-base/blob/master/gulpfile.js
tsconfig.json https://github.com/romelgomez/ng-express-base/blob/master/tsconfig.json
Code Compiled: https://github.com/romelgomez/ng-express-base/tree/master/dist/server Sources: https://github.com/romelgomez/ng-express-base/tree/master/src/server