Skip to content

Commit

Permalink
TODO: Fix bugs of LangSmith and TTS
Browse files Browse the repository at this point in the history
  • Loading branch information
realtomkwok committed Oct 9, 2024
1 parent 7a60488 commit 7bf253f
Show file tree
Hide file tree
Showing 12 changed files with 394 additions and 1,240 deletions.
16 changes: 9 additions & 7 deletions config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const webpack = require('webpack');
const common = require('./webpack.common.js');
const PATHS = require('./paths');
const { TsconfigPathsPlugin } = require('tsconfig-paths-webpack-plugin');
const NodePolyfillPlugin = require("node-polyfill-webpack-plugin")

// Merge webpack configuration files
const config = (env, argv) =>
Expand All @@ -15,6 +16,13 @@ const config = (env, argv) =>
sidepanel: PATHS.src + '/index.tsx',
background: PATHS.src + '/background.js',
},
plugins: [
new Dotenv(),
new webpack.ProvidePlugin({
process: 'process/browser.js',
}),
new NodePolyfillPlugin()
],
resolve: {
fallback: {
'path': require.resolve('path-browserify'),
Expand All @@ -23,17 +31,11 @@ const config = (env, argv) =>
'buffer': require.resolve('buffer/'),
'stream': require.resolve('stream-browserify'),
'node:async_hooks': require.resolve('node:async_hooks'),
'process': require.resolve('process/browser'),
},
plugins: [new TsconfigPathsPlugin({ configFile: './tsconfig.json' })],
extensions: ['.tsx', '.ts', '.js'],
},
plugins: [
new Dotenv(),
new webpack.ProvidePlugin({
process: 'process/browser.js',
}),

],
devServer: {
header: {
'Access-Control-Allow-Origin': '*',
Expand Down
Loading

0 comments on commit 7bf253f

Please sign in to comment.