wisemapping-frontend/packages/mindplot/webpack.test.js

34 lines
929 B
JavaScript
Raw Normal View History

2021-09-07 22:31:46 +02:00
const path = require('path');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
/** @type {import('webpack').Configuration} */
module.exports = {
2021-09-08 22:45:26 +02:00
entry: {
palette: path.resolve(__dirname, './test/javascript/static/test/testPalette'),
layout: path.resolve(__dirname, './test/javascript/static/test/testLayout'),
},
2021-09-07 22:31:46 +02:00
output: {
path: path.resolve(__dirname, 'dist', 'test'),
2021-09-08 22:45:26 +02:00
filename: '[name].test.js',
2021-09-07 22:31:46 +02:00
publicPath: '',
},
2021-09-08 22:45:26 +02:00
mode: 'production',
2021-09-07 22:31:46 +02:00
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()],
};