Browser not importing js file from index.html call

I am using the tutorial to build the breakout game in javascript. I have
index.html file with script calling to
index.js file as the game tutor has instrcuted

within the index,js file I have import function which is designed to import file known as paddle.js

paddle.js contains the styling for the paddle used in the game/

I cannot view the paddle in the broswer

the error appears to be related to the import operation

any ideas

someone suggested you cant use import function because cant read it and suggested transpiling to es5


What tutorial are you referring to? Do you have your code somewhere online so we can see it?

You might also have to check your import/export and paths.

It’s probably one of these: (I actually took that one)

@jmcclain0129 can you show the code?

There is limited support for the import keyword on the front end. Using it within the browser itself may or may not work. I know the latest stable Chrome supports it, but IE/Edge do not. YMMV

In order to support legacy browsers (basically, nearly everything before the last few months), you’d need to use something to handle importing files, something like requireJS.