mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
chore: add type to webpack config file (#12072)
This commit is contained in:
@@ -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: {
|
||||||
|
|||||||
@@ -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',
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -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: {
|
||||||
|
|||||||
@@ -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),
|
||||||
|
|||||||
Reference in New Issue
Block a user