Skip to content

Commit

Permalink
docker file and webpack fix (#186)
Browse files Browse the repository at this point in the history
  • Loading branch information
GurinderRawala authored Sep 5, 2024
1 parent 24b0abd commit c83f2af
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ COPY conf/defaults.ini ./conf/defaults.ini

RUN apk add --no-cache make build-base python3

RUN yarn install --immutable
RUN yarn install

COPY tsconfig.json .eslintrc .editorconfig .browserslistrc .prettierrc.js ./
COPY scripts scripts
Expand Down
12 changes: 12 additions & 0 deletions scripts/webpack/webpack.dev.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
'use strict';

const browserslist = require('browserslist');
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
const { EsbuildPlugin } = require('esbuild-loader');
const { resolveToEsbuildTarget } = require('esbuild-plugin-browserslist');
const ESLintPlugin = require('eslint-webpack-plugin');
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
Expand Down Expand Up @@ -67,12 +69,22 @@ module.exports = (env = {}) => {
},

// https://webpack.js.org/guides/build-performance/#avoid-extra-optimization-steps
// optimization: {
// moduleIds: 'named',
// runtimeChunk: true,
// removeAvailableModules: false,
// removeEmptyChunks: false,
// splitChunks: false,
// },

optimization: {
moduleIds: 'named',
runtimeChunk: true,
removeAvailableModules: false,
removeEmptyChunks: false,
splitChunks: false,
minimize: parseInt(env.noMinify, 10) !== 1,
minimizer: [new EsbuildPlugin(esbuildOptions), new CssMinimizerPlugin()],
},

// enable persistent cache for faster cold starts
Expand Down

0 comments on commit c83f2af

Please sign in to comment.