-1

How can I import a file with special characters in it's name in ES6?

I can

import { tomorrow} from 'react-syntax-highlighter/dist/esm/styles/hljs';

but I can't:

import { tomorrow-night} from 'react-syntax-highlighter/dist/esm/styles/hljs';

Toby Maguire
  • 146
  • 1
  • 11
  • That's the name of the exported function/class/whatever that you are importing, not the file. How are you exporting the identifier? – Heretic Monkey Oct 21 '21 at 14:48

1 Answers1

0

JavaScript do not support hyphens in variable name. They are reserved for subtractions.