Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion graylog2-web-interface/webpack.preflight.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@
* along with this program. If not, see
* <http://www.mongodb.com/licensing/server-side-public-license>.
*/
const path = require('path');

Check warning on line 17 in graylog2-web-interface/webpack.preflight.ts

View workflow job for this annotation

GitHub Actions / Reviewbot

A `require()` style import is forbidden.


const webpack = require('webpack');

Check warning on line 19 in graylog2-web-interface/webpack.preflight.ts

View workflow job for this annotation

GitHub Actions / Reviewbot

A `require()` style import is forbidden.

const HtmlWebpackPlugin = require('html-webpack-plugin');

Check warning on line 20 in graylog2-web-interface/webpack.preflight.ts

View workflow job for this annotation

GitHub Actions / Reviewbot

A `require()` style import is forbidden.

const { merge } = require('webpack-merge');

Check warning on line 21 in graylog2-web-interface/webpack.preflight.ts

View workflow job for this annotation

GitHub Actions / Reviewbot

A `require()` style import is forbidden.

const { EsbuildPlugin } = require('esbuild-loader');

Check warning on line 22 in graylog2-web-interface/webpack.preflight.ts

View workflow job for this annotation

GitHub Actions / Reviewbot

A `require()` style import is forbidden.

const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');

Check warning on line 23 in graylog2-web-interface/webpack.preflight.ts

View workflow job for this annotation

GitHub Actions / Reviewbot

A `require()` style import is forbidden.


const { DEFAULT_API_URL } = require('./webpack.vendor');

Check warning on line 25 in graylog2-web-interface/webpack.preflight.ts

View workflow job for this annotation

GitHub Actions / Reviewbot

A `require()` style import is forbidden.

const supportedBrowsers = require('./supportedBrowsers');

Check warning on line 26 in graylog2-web-interface/webpack.preflight.ts

View workflow job for this annotation

GitHub Actions / Reviewbot

A `require()` style import is forbidden.

const core = require('./webpack/core');

Check warning on line 27 in graylog2-web-interface/webpack.preflight.ts

View workflow job for this annotation

GitHub Actions / Reviewbot

A `require()` style import is forbidden.


const ROOT_PATH = path.resolve(__dirname);
const APP_PATH = path.resolve(ROOT_PATH, 'src');
Expand All @@ -51,7 +51,7 @@
resolve: {
// you can now require('file') instead of require('file.coffee')
extensions: ['.js', '.json', '.jsx', '.ts', '.tsx'],
modules: [APP_PATH, path.resolve(ROOT_PATH, 'node_modules'), path.resolve(ROOT_PATH, 'public')],
modules: [APP_PATH, 'node_modules', path.resolve(ROOT_PATH, 'node_modules'), path.resolve(ROOT_PATH, 'public')],
},
module: {
rules: core.rules(TARGET, supportedBrowsers),
Expand Down
5 changes: 4 additions & 1 deletion graylog2-web-interface/webpack/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* along with this program. If not, see
* <http://www.mongodb.com/licensing/server-side-public-license>.
*/
const path = require('path');

Check warning on line 17 in graylog2-web-interface/webpack/core.js

View workflow job for this annotation

GitHub Actions / Reviewbot

A `require()` style import is forbidden.


const webpack = require('webpack');
const { merge } = require('webpack-merge');
Expand Down Expand Up @@ -134,7 +134,10 @@
resolve: {
// you can now require('file') instead of require('file.coffee')
extensions: ['.js', '.json', '.jsx', '.ts', '.tsx'],
modules: [appPath, path.resolve(rootPath, 'node_modules'), path.resolve(rootPath, 'public')],
// The bare `node_modules` entry makes webpack walk up from the importing module like node does.
// Without it only the hoisted top-level copy is ever found, so nested versions kept apart on
// purpose get flattened into one, which can turn peer dependencies into require cycles.
modules: [appPath, 'node_modules', path.resolve(rootPath, 'node_modules'), path.resolve(rootPath, 'public')],
alias: {
'@graylog/server-api': path.resolve(webInterfaceRoot, 'target', 'api'),
},
Expand Down
Loading