From ecddb8c6229e1464e1fdf955f3a85a59b8d2dc33 Mon Sep 17 00:00:00 2001 From: David Golightly Date: Wed, 8 Jun 2022 20:59:07 +0200 Subject: [PATCH] update precommit hook to format --- .husky/pre-commit | 1 + webpack.config.js | 16 +++++++--------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.husky/pre-commit b/.husky/pre-commit index 6cdaab7b..5d073c9d 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -2,3 +2,4 @@ . "$(dirname -- "$0")/_/husky.sh" yarn lint +yarn format \ No newline at end of file diff --git a/webpack.config.js b/webpack.config.js index c6c80e07..12731b72 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,10 +1,10 @@ -const path = require("path"); -const TerserPlugin = require("terser-webpack-plugin"); +const path = require('path') +const TerserPlugin = require('terser-webpack-plugin') const paths = { source: path.resolve(__dirname, 'src'), - es5: path.resolve(__dirname, "dist", "es5"), -}; + es5: path.resolve(__dirname, 'dist', 'es5'), +} const commonConfig = { output: { @@ -30,11 +30,9 @@ const commonConfig = { }, optimization: { minimize: true, - minimizer: [ - new TerserPlugin(), - ] - } -}; + minimizer: [new TerserPlugin()], + }, +} const rruleConfig = Object.assign( {