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

32 lines
810 B
JavaScript
Raw Normal View History

2021-07-16 16:41:58 +02:00
const path = require('path');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
/** @type {import('webpack').Configuration} */
module.exports = {
entry: './test/javascript/render/testing.js',
output: {
2021-09-08 22:45:26 +02:00
path: path.resolve(__dirname, 'dist', 'tests'),
2021-07-16 16:41:58 +02:00
filename: '[name].js',
publicPath: '',
},
mode: 'production',
devtool: 'source-map',
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()],
};