mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-14 03:07:57 +01:00
40 lines
1016 B
JavaScript
40 lines
1016 B
JavaScript
const path = require('path');
|
|
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
|
|
|
|
/** @type {import('webpack').Configuration} */
|
|
module.exports = {
|
|
entry: {
|
|
testingLayout: './test/javascript/static/test/testingLayout',
|
|
testingPallete: './test/javascript/static/test/testingPalette',
|
|
},
|
|
output: {
|
|
path: path.resolve(__dirname, 'dist', 'tests'),
|
|
filename: '[name].js',
|
|
publicPath: '',
|
|
},
|
|
optimization: {
|
|
splitChunks: {
|
|
chunks: 'all',
|
|
minSize: 2000000,
|
|
},
|
|
},
|
|
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()],
|
|
};
|