wisemapping-frontend/packages/mindplot/webpack.playground.js
Paulo Gustavo Veiga bf08888a68 Update to yarn 3.
2023-01-04 18:23:09 -08:00

39 lines
940 B
JavaScript

const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CopyPlugin = require('copy-webpack-plugin');
const { merge } = require('webpack-merge');
const common = require('./webpack.common');
const playgroundConfig = {
mode: 'development',
entry: {
layout: path.resolve(__dirname, './test/playground/layout/context-loader'),
},
output: {
path: path.resolve(__dirname, 'test/playground/dist'),
filename: '[name].js',
library: {
type: 'umd',
},
},
devServer: {
historyApiFallback: true,
port: 8083,
open: false
},
plugins: [
new CopyPlugin({
patterns: [
{ from: 'test/playground/index.html', to: 'index.html' },
],
}),
new HtmlWebpackPlugin({
chunks: ['layout'],
filename: 'layout.html',
template: 'test/playground/layout/index.html',
}),
],
};
module.exports = merge(common, playgroundConfig);