Skip to content

Commit

Permalink
after plugin update
Browse files Browse the repository at this point in the history
  • Loading branch information
srclosson committed Oct 22, 2024
1 parent b8ea047 commit 496039e
Showing 1 changed file with 21 additions and 19 deletions.
40 changes: 21 additions & 19 deletions .config/webpack/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
import path from 'path';
import ReplaceInFileWebpackPlugin from 'replace-in-file-webpack-plugin';
import TerserPlugin from 'terser-webpack-plugin';
import { SubresourceIntegrityPlugin } from "webpack-subresource-integrity";
import { SubresourceIntegrityPlugin } from 'webpack-subresource-integrity';
import { type Configuration, BannerPlugin } from 'webpack';
import LiveReloadPlugin from 'webpack-livereload-plugin';
import VirtualModulesPlugin from 'webpack-virtual-modules';
Expand Down Expand Up @@ -163,8 +163,8 @@ const config = async (env): Promise<Configuration> => {
comments: (_, { type, value }) => type === 'comment2' && value.trim().startsWith('[create-plugin]'),
},
compress: {
drop_console: ['log', 'info']
}
drop_console: ['log', 'info'],
},
},
}),
],
Expand All @@ -188,7 +188,7 @@ const config = async (env): Promise<Configuration> => {
virtualPublicPath,
// Insert create plugin version information into the bundle
new BannerPlugin({
banner: "/* [create-plugin] version: " + cpVersion + " */",
banner: '/* [create-plugin] version: ' + cpVersion + ' */',
raw: true,
entryOnly: true,
}),
Expand Down Expand Up @@ -232,22 +232,24 @@ const config = async (env): Promise<Configuration> => {
},
]),
new SubresourceIntegrityPlugin({
hashFuncNames: ["sha256"],
hashFuncNames: ['sha256'],
}),
...(env.development ? [
new LiveReloadPlugin(),
new ForkTsCheckerWebpackPlugin({
async: Boolean(env.development),
issue: {
include: [{ file: '**/*.{ts,tsx}' }],
},
typescript: { configFile: path.join(process.cwd(), 'tsconfig.json') },
}),
new ESLintPlugin({
extensions: ['.ts', '.tsx'],
lintDirtyModulesOnly: Boolean(env.development), // don't lint on start, only lint changed files
}),
] : []),
...(env.development
? [
new LiveReloadPlugin(),
new ForkTsCheckerWebpackPlugin({
async: Boolean(env.development),
issue: {
include: [{ file: '**/*.{ts,tsx}' }],
},
typescript: { configFile: path.join(process.cwd(), 'tsconfig.json') },
}),
new ESLintPlugin({
extensions: ['.ts', '.tsx'],
lintDirtyModulesOnly: Boolean(env.development), // don't lint on start, only lint changed files
}),
]
: []),
],

resolve: {
Expand Down

0 comments on commit 496039e

Please sign in to comment.