Chipvuelto8/webpack.configdev.js

42 lines
754 B
JavaScript
Raw Permalink Normal View History

2024-09-01 15:52:46 +01:00
import path from 'path';
import { fileURLToPath } from 'url';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
export default {
entry: './src/index.ts',
output: {
filename: 'revuelto8ts.js',
path: path.resolve(__dirname, 'dist'),
publicPath: '/dist/',
library: {
name: 'Revuelto8ts',
type: 'umd',
export: 'default',
},
globalObject: 'this',
},
mode: 'development',
devtool: 'source-map',
resolve: {
extensions: ['.ts', '.tsx', '.js'],
},
module: {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/,
},
],
},
devServer: {
static: {
directory: path.join(__dirname, './'),
},
hot: true,
compress: false,
port: 5500,
}
};