Skip to content

VSCode launch configuration for debugging #586

Closed Answered by mlakmal
mlakmal asked this question in Q&A
Discussion options

You must be logged in to vote

fyi: was able to resolve this issue. by default babel will transpile code to single line and remove whitespaces. this causes issues with sourcemap locations. we can add below settings to babel-loader options to disable auto newline/whitespace removal.

{
          test: /\.[jt]sx?$/,
          exclude: /node_modules/,
          use: {
            loader: 'babel-loader',
            options: {
              /** Add React Refresh transform only when HMR is enabled. */
              plugins: devServer && devServer.hmr ? ['module:react-refresh/babel'] : undefined,
              /** retailLises and compact is used to keep the code formatting and whitespace in development mode 
               * …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mlakmal
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