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

47 lines
1.0 KiB
JavaScript
Raw Normal View History

2021-09-07 22:31:46 +02:00
const path = require('path');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
2021-09-07 22:31:46 +02:00
/** @type {import('webpack').Configuration} */
module.exports = {
2021-10-05 02:38:11 +02:00
entry: {
layout: path.resolve(__dirname, './test/playground/context-loader'),
},
output: {
path: path.resolve(__dirname, 'dist', 'test'),
filename: '[name].test.js',
publicPath: '',
},
mode: 'production',
optimization: {
splitChunks: {
chunks: 'all',
minSize: 2000000,
2021-09-08 22:45:26 +02:00
},
2021-10-05 02:38:11 +02:00
},
devtool: 'source-map',
module: {
rules: [
{
use: 'babel-loader',
test: /.js$/,
exclude: /node_modules/,
},
],
2021-10-05 02:38:11 +02:00
},
resolve: {
extensions: ['.js', '.json'],
},
plugins: [
new CleanWebpackPlugin(),
new HtmlWebpackPlugin({
template: 'test/playground/index.html',
}),
new HtmlWebpackPlugin({
chunks: ['layout'],
filename: 'layout',
template: 'test/playground/layout.html',
}),
],
2021-09-07 22:31:46 +02:00
};