2021-07-16 16:41:58 +02:00
|
|
|
const path = require('path'); // eslint-disable-line
|
|
|
|
const { CleanWebpackPlugin } = require('clean-webpack-plugin'); // eslint-disable-line
|
|
|
|
|
|
|
|
/** @type {import('webpack').Configuration} */
|
2021-09-23 19:25:22 +02:00
|
|
|
module.exports = {
|
|
|
|
// eslint-disable-line
|
2021-07-16 16:41:58 +02:00
|
|
|
entry: './lib/core.js',
|
|
|
|
output: {
|
|
|
|
path: path.resolve(__dirname, 'dist'), // eslint-disable-line
|
|
|
|
filename: 'core.js',
|
|
|
|
publicPath: '',
|
|
|
|
},
|
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
use: 'babel-loader',
|
|
|
|
test: /.(js|jsx)$/,
|
|
|
|
exclude: /node_modules/,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
type: 'asset',
|
|
|
|
test: /\.(png|svg|jpg|jpeg|gif)$/i,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
resolve: {
|
|
|
|
extensions: ['.js', '.jsx', '.json'],
|
|
|
|
},
|
|
|
|
plugins: [new CleanWebpackPlugin()],
|
|
|
|
};
|