module.exports = {
    entry: "./src/exports.js",
    output: {
        filename: 'bundle.js',
        library: 'ModelViewer',
        libraryTarget: 'var'
    },
    module: {
        rules: [
            {
                test: /\.js$/,
                exclude: function(modulePath)
                {
                    return /node_modules/.test(modulePath) &&
                    !/node_modules\/gl-matrix/.test(modulePath);
                },
                use: {
                    loader: 'babel-loader',
                    options: {
                        presets: ['babel-preset-es2015-script'],
                    }
                }
            },
        ]
    }
}

module.exports = {
    entry: "./src/exports.js",
    output: {
        filename: 'bundle.js',
        library: 'ModelViewer',
        libraryTarget: 'var'
    },
    module: {
        rules: [
            {
                test: /\.js$/,
                exclude: /(node_modules)/,
                use: {
                    loader: 'babel-loader',
                    options: {
                        presets: ['babel-preset-es2015-script'],
                    }
                }
            },
        ]
    }
}

--- 
+++ 
@@ -9,7 +9,11 @@
         rules: [
             {
                 test: /\.js$/,
-                exclude: /(node_modules)/,
+                exclude: function(modulePath)
+                {
+                    return /node_modules/.test(modulePath) &&
+                    !/node_modules\/gl-matrix/.test(modulePath);
+                },
                 use: {
                     loader: 'babel-loader',
                     options: {
Fix bug where production build fails because of gl-matrix being ES6.
