text: import { dirname, resolve } from 'path'
  import { fileURLToPath } from 'url'
  
  const __dirname = dirname(fileURLToPath(import.meta.url))
  
  export default {
    entry: './src/index.js',
    resolve: {
      extensions: ['.tsx', '.ts', '.js', '.css'],
    },
    output: {
      filename: 'index.js',
      path: resolve(__dirname, 'public'),
      library: {
        type: 'module'
      }
    },
    devtool: 'source-map',
    module: {
      rules: [
        {
          test: /\.css$/i,
          use: ['style-loader', 'css-loader'],
        },
        {
          test: /\.tsx?$/,
          use: 'ts-loader',
          exclude: /node_modules/,
        },
      ],
    },
    experiments: {
      outputModule: true,
    }
  }
  