2020-11-28 01:32:05 +01:00
|
|
|
"use strict";
|
|
|
|
|
|
|
|
const path = require("path");
|
|
|
|
|
|
|
|
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
|
|
|
const CopyWebpackPlugin = require("copy-webpack-plugin");
|
|
|
|
|
2021-04-13 18:55:46 +02:00
|
|
|
require("webpack");
|
2020-11-28 01:32:05 +01:00
|
|
|
module.exports = {
|
|
|
|
context: path.resolve(__dirname, 'src'),
|
|
|
|
entry: './main.js',
|
2021-03-07 18:52:40 +01:00
|
|
|
mode: 'production',
|
2023-02-10 11:19:00 +01:00
|
|
|
performance: {
|
|
|
|
maxEntrypointSize: 600000,
|
|
|
|
maxAssetSize: 600000
|
|
|
|
},
|
2020-11-28 01:32:05 +01:00
|
|
|
output: {
|
|
|
|
path: path.resolve(__dirname, 'build'),
|
|
|
|
},
|
|
|
|
devServer: {
|
2022-01-24 18:08:39 +01:00
|
|
|
static: {
|
|
|
|
directory: path.resolve(__dirname, 'build')
|
|
|
|
},
|
2020-11-28 01:32:05 +01:00
|
|
|
},
|
|
|
|
devtool: 'source-map',
|
|
|
|
plugins: [
|
|
|
|
new HtmlWebpackPlugin({
|
|
|
|
template: './index.html',
|
|
|
|
minify: false
|
|
|
|
}),
|
|
|
|
new CopyWebpackPlugin({
|
|
|
|
patterns: [
|
|
|
|
"**/*.css",
|
2023-02-10 11:19:00 +01:00
|
|
|
"**/*.mp3",
|
|
|
|
"**/*.ogg",
|
2020-11-28 01:32:05 +01:00
|
|
|
"**/*.svg",
|
|
|
|
"**/*.png",
|
|
|
|
"directives/*.html",
|
|
|
|
"serviceworker.js",
|
|
|
|
"../package.json",
|
2020-11-28 03:52:55 +01:00
|
|
|
"manifest.json",
|
|
|
|
"manifest.webapp",
|
2021-04-13 18:51:08 +02:00
|
|
|
"webapp.manifest.json",
|
2021-04-13 18:55:46 +02:00
|
|
|
{
|
|
|
|
from: "../node_modules/bootstrap/dist/css/bootstrap.min.css",
|
|
|
|
to: "css/"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
from: "../node_modules/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2",
|
2022-02-01 21:46:12 +01:00
|
|
|
to: "fonts/"
|
2021-04-13 18:55:46 +02:00
|
|
|
},
|
2021-04-13 18:51:08 +02:00
|
|
|
{ from: "../node_modules/emojione/lib/js/emojione.min.js" },
|
|
|
|
{ from: "../node_modules/linkifyjs/dist/linkify.min.js" },
|
2023-07-09 14:19:10 +02:00
|
|
|
{ from: "../node_modules/linkify-string/dist/linkify-string.min.js" },
|
2020-11-28 01:32:05 +01:00
|
|
|
]
|
2021-04-11 13:29:19 +02:00
|
|
|
}),
|
2020-11-28 01:32:05 +01:00
|
|
|
],
|
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /\.js$/i,
|
|
|
|
exclude: /node_modules/,
|
|
|
|
use: [
|
|
|
|
{
|
|
|
|
loader: 'babel-loader'
|
|
|
|
}
|
|
|
|
]
|
2021-04-11 13:29:19 +02:00
|
|
|
},
|
2020-11-28 01:32:05 +01:00
|
|
|
]
|
|
|
|
}
|
2021-03-07 18:52:40 +01:00
|
|
|
};
|