jens-duttke/gatsby-plugin-dts-css-modules

Typescript syntax in .js file

Closed this issue · 1 comments

During the build of gatsby with the plugin it fails, with the following error:

  Error: (...)/node_modules/gatsby-plugin-dts-css-modules/gatsby-node.js:9
  if (!config.module?.rules) {
                     ^
  SyntaxError: Unexpected token '.'

I believe it is caused by using Typescript ? syntax in plain JS file:

if (!config.module?.rules) {