chore: add type to webpack config file (#12072)

This commit is contained in:
Percy Ma
2024-12-27 08:17:46 +08:00
committed by GitHub
parent 0b7e572df0
commit d79dfd0382
4 changed files with 4 additions and 2 deletions

View File

@@ -16,6 +16,7 @@ if (relativePath === undefined) {
relativePath = urlObject.pathname !== '/' ? urlObject.pathname.replace(/\/+$/, '') : '';
}
/** @type { import('webpack').Configuration } */
module.exports = {
plugins: [],
entry: {

View File

@@ -3,7 +3,7 @@
const { merge } = require('webpack-merge');
const common = require('./webpack.common');
module.exports = merge(common, {
module.exports = merge(common, /** @type { import('webpack').Configuration } */ {
mode: 'development',
// devtool: 'eval-source-map',
});

View File

@@ -4,6 +4,7 @@
const path = require('path');
/** @type { import('webpack').Configuration } */
module.exports = {
mode: 'production',
entry: {

View File

@@ -6,7 +6,7 @@ const ProgressPlugin = require('progress-webpack-plugin');
const common = require('./webpack.common');
module.exports = merge(common, {
module.exports = merge(common, /** @type { import('webpack').Configuration } */ {
mode: 'production',
plugins: [
new ProgressPlugin(true),