Skip to content

Heap out of memory #526

Answered by carlosnufe
carlosnufe asked this question in Q&A
Discussion options

You must be logged in to vote

hello there, after some research, I found two solutions.

The first solution is to increase the node memory

NODE_OPTIONS=<memory in MB>

The second one is to use the option transpileOnly: true for the ts-loader on the webpack configuration altogether with the fork-ts-checker-webpack-plugin plugin dependency.

(...) // more imports
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');


(...) // start webpack configuration
  module: {
    (...)
    rules: [
      {
        test: /\.(ts|tsx)$/i,
        exclude: ['/node_modules/'],
        use: {
          loader: 'ts-loader',
          options: {
            transpileOnly: true,
          },
        },
      },
      (...

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by carlosnufe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant