mediacms/frontend/packages/scripts/lib/.webpack/build.config.ts
Yiannis Stergiou aa6520daac
Frontent dev env (#247)
* Added frontend development files/environment

* More items-categories related removals

* Improvements in pages templates (inc. static pages)

* Improvements in video player

* Added empty home page message + cta

* Updates in media, playlist and management pages

* Improvements in material icons font loading

* Replaced media & playlists links in frontend dev-env

* frontend package version update

* chnaged frontend dev url port

* static files update

* Changed default position of theme switcher

* enabled frontend docker container
2021-07-11 18:01:34 +03:00

100 lines
2.4 KiB
TypeScript
Executable File

import { Configuration } from 'webpack';
/*const chunksCacheGroups_0 = {
commons: {
test: /[\\/]src[\\/]/,
name: "_commons",
chunks: "all",
enforce: true,
reuseExistingChunk: true,
},
};*/
/*const chunksCacheGroups_1 = {
commons: {
test: /[\\/]src[\\/]/,
name: "_commons",
// priority: -10,
chunks: "all",
enforce: true,
reuseExistingChunk: true,
},
vendors: {
test: /[\\/]node_modules[\\/]/,
// test: /[\\/]node_modules[\\/](react|react-dom)[\\/]/,
// test: /[\\/]node_modules[\\/](!MediaCmsPlayer)[\\/]/,
name: "_vendors",
// priority: -20,
chunks: "all",
enforce: true,
// reuseExistingChunk: true,
},
};*/
/*const chunksCacheGroups_2 = {
commons: {
minChunks: 2,
// maxInitialRequests: 8, // @note: Tested values from 0 to 10, and changes applied with values 0, 4, 5, 6, 7, 8.
// minSize: 0,
name: "_commons",
chunks: "all",
enforce: true,
reuseExistingChunk: true,
},
};*/
/*const chunksCacheGroups_3 = {
vendors: {
test: /[\\/]node_modules[\\/]/,
name: "_commons",
priority: 1,
chunks: "initial",
},
};*/
export const config: Configuration = {
mode: 'production',
devtool: 'source-map',
optimization: {
runtimeChunk: false,
/*splitChunks: {
// minSize: 1000000,
chunks: 'all',
automaticNameDelimiter: '-',
},*/
/*splitChunks: {
// minSize: 1000000,
chunks: 'all',
automaticNameDelimiter: '-',
cacheGroups: chunksCacheGroups_0,
},*/
/*splitChunks: {
chunks: 'all',
automaticNameDelimiter: '-',
cacheGroups: chunksCacheGroups_1,
},*/
/*splitChunks: {
chunks: 'all',
automaticNameDelimiter: '-',
cacheGroups: chunksCacheGroups_2,
},*/
/*splitChunks: {
chunks: 'all',
automaticNameDelimiter: '-',
cacheGroups: chunksCacheGroups_3,
},*/
splitChunks: {
chunks: 'all',
automaticNameDelimiter: '-',
cacheGroups: {
vendors: {
test: /[\\/]node_modules[\\/]/,
name: '_commons',
priority: 1,
chunks: 'initial',
},
},
},
},
};