text: const path = require("path");
  
  module.exports = {
    externals: {
      "parsegraph-checkglerror":{
        commonjs:"parsegraph-checkglerror",
        commonjs2:"parsegraph-checkglerror",
        amd:"parsegraph-checkglerror",
        root:"parsegraph"
      }
    },
    entry: path.resolve(__dirname, "src/shader.ts"),
    output: {
      path: path.resolve(__dirname, "dist-prod"),
      filename: "parsegraph-shader.js",
      globalObject: "this",
      library: "parsegraph",
      libraryTarget: "umd",
    },
    module: {
      rules: [
        {
          test: /\.(js)$/,
          exclude: /node_modules/,
          use: ['babel-loader'],
        },
        {
          test: /\.tsx?$/,
          use: 'ts-loader',
          exclude: /node_modules/,
        },
      ],
    },
    resolve: {
      extensions: [".js", ".ts", ".tsx", ".glsl"],
      modules: [path.resolve(__dirname, "src"), "node_modules"],
    },
    mode: "production",
  };
  