wisemapping-frontend/packages/mindplot/webpack.common.js
2021-09-29 17:24:07 -03:00

30 lines
729 B
JavaScript

const path = require('path');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
/** @type {import('webpack').Configuration} */
module.exports = {
entry: './lib/mindplot',
output: {
path: path.resolve(__dirname, 'dist'),
filename: '[name].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()],
};