initial commit

This commit is contained in:
Adam Piontek 2021-08-02 17:05:36 -04:00
commit 7d3c956806
38 changed files with 31353 additions and 0 deletions

View file

@ -0,0 +1,22 @@
const path = require('path');
module.exports = {
paths: {
/* Path to source files directory */
source: path.resolve(__dirname, '../src/'),
/* Path to built files directory */
output: path.resolve(__dirname, '../dist/'),
},
server: {
host: '0.0.0.0',
port: 4000,
},
limits: {
/* Image files size in bytes. Below this value the image file will be served as DataURL (inline base64). */
images: 8192,
/* Font files size in bytes. Below this value the font file will be served as DataURL (inline base64). */
fonts: 8192,
},
};

View file

@ -0,0 +1,38 @@
/* eslint-disable import/no-extraneous-dependencies */
const { merge } = require('webpack-merge');
const webpackConfiguration = require('../webpack.config');
const environment = require('./environment');
module.exports = merge(webpackConfiguration, {
mode: 'development',
/* Manage source maps generation process */
devtool: 'eval-source-map',
/* Development Server Configuration */
devServer: {
contentBase: environment.paths.output,
watchContentBase: true,
publicPath: '/',
open: true,
historyApiFallback: true,
compress: true,
overlay: true,
hot: false,
watchOptions: {
poll: 300,
},
...environment.server,
},
/* File watcher options */
watchOptions: {
aggregateTimeout: 300,
poll: 300,
ignored: /node_modules/,
},
/* Additional plugins configuration */
plugins: [],
});

View file

@ -0,0 +1,33 @@
/* eslint-disable import/no-extraneous-dependencies */
const { merge } = require('webpack-merge');
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
const TerserPlugin = require('terser-webpack-plugin');
const webpackConfiguration = require('../webpack.config');
module.exports = merge(webpackConfiguration, {
mode: 'production',
/* Manage source maps generation process. Refer to https://webpack.js.org/configuration/devtool/#production */
devtool: false,
/* Optimization configuration */
optimization: {
minimize: true,
minimizer: [
new TerserPlugin({
parallel: true,
}),
new CssMinimizerPlugin(),
],
},
/* Performance treshold configuration values */
performance: {
maxEntrypointSize: 512000,
maxAssetSize: 512000,
},
/* Additional plugins configuration */
plugins: [],
});