File size: 1,291 Bytes
13555f3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
const merge = require('webpack-merge');
const path = require('path');
const CopyPlugin = require('copy-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');

const makeCommonConfig = require('./webpack.common.js');

const commonConfig = makeCommonConfig();

const config = merge.merge(commonConfig, {
    mode: 'development',
    devtool: 'inline-source-map',
    optimization: {
        minimize: false,
    },
    devServer: {
        port: 9000,
        open: "/editor.html",
    },
    entry: ['./src/components/blocksEditor/devmain.tsx'],
    plugins: [
        new CopyPlugin({
            patterns: [
                {from: path.resolve(__dirname, 'static'), to: 'static'},
            ],
        }),
        new HtmlWebpackPlugin({
            inject: true,
            title: 'Focalboard',
            chunks: ['main'],
            template: 'html-templates/deveditor.ejs',
            filename: 'editor.html',
            publicPath: '/',
            hash: true,
        }),
    ],
});

module.exports = [
    merge.merge(config, {
        devtool: 'source-map',
        output: {
            devtoolNamespace: 'focalboard',
        },
    }),
];