How to orginize js code when you are using v8js engine for php prerending?

(Spb Sprut) #1

The problem is that in order to have v8js to work I need to include js file which must look like that

let HelloWorld = function(props){
return (
React.createElement(‘h1’, null, ‘Hello World!’+props.count)

No import, no exports lines

But I can’t find how to include now this file to my index.js (webpack) without this lines (import, export)

I want to have one component which I could use in v8js and webpack at the same time.

Sorry for my bad English ;/