You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
825 B
36 lines
825 B
const path = require('path');
|
|
|
|
module.exports = {
|
|
entry: './src/index.tsx', // Entry point for your widget
|
|
output: {
|
|
filename: 'bundle.js',
|
|
path: path.resolve(__dirname, 'dist'),
|
|
},
|
|
resolve: {
|
|
extensions: ['.ts', '.tsx', '.js', '.json'],
|
|
fallback: {
|
|
stream: require.resolve('stream-browserify'), // Polyfill for 'stream'
|
|
},
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.tsx?$/,
|
|
use: 'ts-loader', // Make sure you have ts-loader installed for TypeScript files
|
|
exclude: /node_modules/,
|
|
},
|
|
{
|
|
test: /\.css$/,
|
|
use: ['style-loader', 'css-loader'], // If you use CSS
|
|
},
|
|
],
|
|
},
|
|
resolveLoader: {
|
|
alias: {
|
|
// Add any custom loader configuration here if necessary
|
|
},
|
|
},
|
|
plugins: [
|
|
// Any necessary plugins
|
|
],
|
|
};
|