mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-11 01:43:23 +01:00
32 lines
812 B
JavaScript
32 lines
812 B
JavaScript
|
const path = require('path');
|
||
|
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
|
||
|
|
||
|
/** @type {import('webpack').Configuration} */
|
||
|
module.exports = {
|
||
|
entry: './test/javascript/render/testing.js',
|
||
|
output: {
|
||
|
path: path.resolve(__dirname, 'target', 'tests'),
|
||
|
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()],
|
||
|
};
|