app.js:5 Uncaught SyntaxError: Unexpected token 'export' code example

Example 1: Unexpected token 'export'

class MyClass1 {
}
class MyClass2 {
}
module.exports = { MyClass1, MyClass2 }

Example 2: popper.min.js:4 Uncaught SyntaxError: Unexpected token 'export'

bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
                    "~/Scripts/jquery.validate*"));

        // Use the development version of Modernizr to develop with and learn from. Then, when you're
        // ready for production, use the build tool at https://modernizr.com to pick only the tests you need.
        bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
                    "~/Scripts/modernizr-*"));

        bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
                    "~/Scripts/umd/popper.min.js",
                  "~/Scripts/bootstrap.js",
                  "~/Scripts/respond.js"));