mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-25 15:47:55 +01:00
6f3fc75198
fix build (separate output dir for playground) fix topicShape test fix topicFontChange test update/add snapshots
50 lines
1.2 KiB
JavaScript
50 lines
1.2 KiB
JavaScript
const path = require('path');
|
|
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
|
|
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,
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.css$/i,
|
|
use: ['style-loader', 'css-loader?url=false'],
|
|
},
|
|
],
|
|
},
|
|
plugins: [
|
|
new CleanWebpackPlugin(),
|
|
new CopyPlugin({
|
|
patterns: [
|
|
{ from: '../../libraries/bootstrap', to: 'bootstrap' },
|
|
{ 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);
|