Skip to content

Commit

Permalink
build.js: drop ip.js hack
Browse files Browse the repository at this point in the history
Since f27fc31 we ported from the ip
module to the ipaddr.js module. ip was a pure node.js module so required
a hack to work.
  • Loading branch information
jelly committed Sep 5, 2024
1 parent 7b1ef1a commit 8990be4
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions build.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import os from 'node:os';
import process from 'node:process';

import copy from 'esbuild-plugin-copy';
import { replace } from 'esbuild-plugin-replace';

import { cockpitCompressPlugin } from './pkg/lib/esbuild-compress-plugin.js';
import { cockpitPoEsbuildPlugin } from './pkg/lib/cockpit-po-plugin.js';
Expand Down Expand Up @@ -101,15 +100,6 @@ const context = await esbuild.context({
{ from: ['./src/index.html'], to: ['./index.html'] },
]
}),
// TODO: The following HACKS are needed for ip module - replace this module with one better maintained
// The replacement is done as ip module imports `os` which is not in our dependencies, but since we don't use
// the functions using the `os` module, we can just replace it with an empty object
replace({
include: /ip.js/,
values: {
"var os": 'var os = {}; // HACK: os is not really used in our used functions from ip.js',
}
}),
...esbuildStylesPlugins,
cockpitPoEsbuildPlugin(),

Expand Down

0 comments on commit 8990be4

Please sign in to comment.