Importing an ES6 module for use with single html page without local node server, angular or react

I'm currently doing a small from which only contains a html5 pages .. index.html.

Currently I am adding the javascript code to the actual page between script tags.

What I want to do is to create an ES6 module and import it to to this index.html page.

But I want to do this without having to use node, angular or react in a project.

What is the easiest ay to do this with my layout?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Julian HansenCommented:
You could use Babel to transpile your ES6 code to ES5 - that is the standard way of doing it
error2013Author Commented:
I'm reading that I can use babel on my index.html as a standalone via cdn?

If so how would I use it?
Julian HansenCommented:
You can but why would you want to do that? It is just adding an overhead to your page repeating the same transpile against a static source.

Why not use webpack or similar to build your site - do the transpile of your module and produce an optimised output.
error2013Author Commented:
Because this is just for a quick thing I'm doing for testing some stuff
Julian HansenCommented:
Then just add the babel plugin and declare your scripts in a babel script block
<script type="text/babel">

Open in new window

<!doctype html>
<title>Test Bable</title>
<script src=""></script>
<script type="text/babel">
var x = ['apple','dog','cat','monkey','car'];

var p = x.filter(aa => {
  return aa.indexOf('c') > -1;

Open in new window

More information here

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.