24 lines
452 B
JavaScript
24 lines
452 B
JavaScript
const path = require('node:path');
|
|
|
|
module.exports = {
|
|
entry: './src/index.js',
|
|
output: {
|
|
path: path.resolve(__dirname, 'dist'),
|
|
filename: 'bundle.js',
|
|
publicPath: '/dist/',
|
|
assetModuleFilename: 'images/[hash][ext][query]'
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.(png|svg|jpg|jpeg|gif)$/i,
|
|
type: 'asset/resource',
|
|
},
|
|
{
|
|
test: /\.txt$/i,
|
|
type: 'asset/source',
|
|
}
|
|
],
|
|
},
|
|
};
|