Skip to content
This repository was archived by the owner on Jun 28, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
1faeb76
initial commit
mmahalwy Jul 25, 2018
4b69a52
initial commit2
mmahalwy Jul 25, 2018
f50353d
more changes
mmahalwy Jul 27, 2018
7e1552f
deps
mmahalwy Jul 27, 2018
d71ff5e
remove uneeded files
mmahalwy Jul 27, 2018
c7793ee
audioplayer working
mmahalwy Aug 2, 2018
439e959
more work
mmahalwy Aug 7, 2018
e21e141
many great updates
mmahalwy Aug 9, 2018
251d2b3
more changes
mmahalwy Aug 10, 2018
32d97ce
doing great
mmahalwy Aug 10, 2018
a08fbfc
improve circle
mmahalwy Aug 10, 2018
923c36c
work
mmahalwy Aug 10, 2018
0b7a4bc
make verse happy
mmahalwy Aug 10, 2018
ee928ba
tsc
mmahalwy Aug 10, 2018
5cc0b9e
Tests, changes and additions
mmahalwy Aug 13, 2018
fa2ab4b
added many tests
mmahalwy Aug 29, 2018
cbbcc64
fixed all ts problems
mmahalwy Aug 29, 2018
bda58b0
fix tests
mmahalwy Aug 30, 2018
f42c4e7
fix tests
mmahalwy Aug 30, 2018
d81bbe5
Remove classNames
mmahalwy Aug 30, 2018
203888b
jobs 1
mmahalwy Aug 30, 2018
44b8107
make precommit work
mmahalwy Aug 30, 2018
000f4ce
separate helmet for chapter
mmahalwy Aug 30, 2018
8f3c11f
decrease size further
mmahalwy Aug 30, 2018
805eb8e
fix bundle size
mmahalwy Aug 30, 2018
6a0c104
update
mmahalwy Aug 30, 2018
b6f0f5e
decrease bundle size drastically
mmahalwy Aug 30, 2018
57cd326
fixes https://github.com/quran/quran.com-frontend/issues/990
mmahalwy Aug 30, 2018
3f95eeb
Remove home from bundle check
mmahalwy Aug 30, 2018
4bf690b
remove jobs
mmahalwy Aug 30, 2018
d7a9b6d
wrote docs
mmahalwy Aug 30, 2018
cd35ff0
more docs
mmahalwy Aug 30, 2018
6ffb2de
work jest
mmahalwy Aug 30, 2018
f95a0c3
change config
mmahalwy Aug 30, 2018
a141f8a
change config
mmahalwy Aug 30, 2018
b16ea42
change config
mmahalwy Aug 30, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
work
  • Loading branch information
mmahalwy committed Aug 10, 2018
commit 923c36c55d08c4a57c61e1f4ce4ec8fea754a580
116 changes: 56 additions & 60 deletions internal/webpack/configFactory.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import appRootDir from 'app-root-dir';
import AssetsPlugin from 'assets-webpack-plugin';
import ExtractTextPlugin from 'extract-text-webpack-plugin';
import MiniCssExtractPlugin from 'mini-css-extract-plugin';
import nodeExternals from 'webpack-node-externals';
import path from 'path';
import webpack from 'webpack';
import WebpackMd5Hash from 'webpack-md5-hash';
import strip from 'strip-loader';
import { CheckerPlugin } from 'awesome-typescript-loader';
import UglifyJsPlugin from 'uglifyjs-webpack-plugin';

import { happyPackPlugin, log } from '../utils';
import { ifElse } from '../../shared/utils/logic';
Expand Down Expand Up @@ -142,6 +143,25 @@ export default function webpackConfigFactory(buildOptions) {
__filename: true,
},

optimization: ifProdClient(
{
minimizer: [
new UglifyJsPlugin({
sourceMap: config('includeSourceMapsForOptimisedClientBundle'),
uglifyOptions: {
compress: {
warnings: false,
},
output: {
comments: false,
},
},
}),
],
},
{}
),

// Source map settings.
devtool: ifElse(
// Include source maps for ANY node bundle so that we can support
Expand Down Expand Up @@ -321,31 +341,11 @@ export default function webpackConfigFactory(buildOptions) {
})
),

// For our production client we need to make sure we pass the required
// configuration to ensure that the output is minimized/optimized.
ifProdClient(
() =>
new webpack.optimize.UglifyJsPlugin({
sourceMap: config('includeSourceMapsForOptimisedClientBundle'),
compress: {
screw_ie8: true,
warnings: false,
},
mangle: {
screw_ie8: true,
},
output: {
comments: false,
screw_ie8: true,
},
})
),

// For the production build of the client we need to extract the CSS into
// CSS files.
ifProdClient(
() =>
new ExtractTextPlugin({
new MiniCssExtractPlugin({
filename: '[name]-[contenthash].css',
allChunks: true,
})
Expand Down Expand Up @@ -566,27 +566,25 @@ export default function webpackConfigFactory(buildOptions) {
// Note: The ExtractTextPlugin needs to be registered within the
// plugins section too.
ifProdClient(() => ({
loader: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: [
{
loader: 'css-loader',
query: {
minimize: true,
importLoaders: 2,
sourceMap: true,
},
use: [
MiniCssExtractPlugin.loader,
{
loader: 'css-loader',
query: {
minimize: true,
importLoaders: 2,
sourceMap: true,
},
{
loader: 'sass-loader',
options: {
outputStyle: 'compressed',
sourceMap: true,
sourceMapContents: true,
},
},
{
loader: 'sass-loader',
options: {
outputStyle: 'compressed',
sourceMap: true,
sourceMapContents: true,
},
],
}),
},
],
})),
// When targetting the server we use the "/locals" version of the
// css loader, as we don't need any css files for the server.
Expand Down Expand Up @@ -616,27 +614,25 @@ export default function webpackConfigFactory(buildOptions) {
// Note: The ExtractTextPlugin needs to be registered within the
// plugins section too.
ifProdClient(() => ({
loader: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: [
{
loader: 'css-loader',
query: {
minimize: true,
importLoaders: 2,
sourceMap: false,
},
use: [
MiniCssExtractPlugin.loader,
{
loader: 'css-loader',
query: {
minimize: true,
importLoaders: 2,
sourceMap: false,
},
{
loader: 'sass-loader',
options: {
outputStyle: 'compressed',
sourceMap: false,
sourceMapContents: false,
},
},
{
loader: 'sass-loader',
options: {
outputStyle: 'compressed',
sourceMap: false,
sourceMapContents: false,
},
],
}),
},
],
})),
// When targetting the server we use the "/locals" version of the
// css loader, as we don't need any css files for the server.
Expand Down
Loading