What's the process to get prisma running in heroku...
# orm-help
r
What's the process to get prisma running in heroku? my current setup is: • needs to be
yarn node ./dist/src/index.js
• I have path aliases, so when i run
tsc
, my ./dist folder is throwing errors that I cannot import
@myCustomAlias/server
. Should I use webpack or babel here? I'm hoping someone can help explain what process I need to run.
build: tcs && webpack
? to get aliases working in JS?
r
@Robert Witchell 👋 TypeScript doesn’t support aliases out of the box, so if you’re using them, you need to run a build step like Webpack that maps the aliases properly and builds it via
tsc
.
r
thanks - so should that be a plugin in typescript, or a plugin in webpack?
my webpack currently looks like this, but i'm not sure if i'm going down the right path
also, what should initiate it, and before/after what?
okay - i've got it working now:
Copy code
"build": "yarn prisma generate && yarn build:reflection && tsc && yarn webpack --mode=production",
"start": "NODE_ENV=production node ./dist/main.js",
and Procfile
Copy code
web: yarn start
and webpack
Copy code
entry: './dist/src/index.js',
output: {
    filename: '[name].js',
    path: path.resolve(__dirname, 'dist'),
  },
👍 1
💯 1