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(/\/+$/, '') : ''; relativePath = urlObject.pathname !== '/' ? urlObject.pathname.replace(/\/+$/, '') : '';
} }
/** @type { import('webpack').Configuration } */
module.exports = { module.exports = {
plugins: [], plugins: [],
entry: { entry: {

View File

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

View File

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

View File

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