Skip to content

Commit

Permalink
fix website build
Browse files Browse the repository at this point in the history
Signed-off-by: Ihor Dykhta <dikhta.igor@gmail.com>
  • Loading branch information
igorDykhta committed Mar 7, 2024
1 parent 1a7af85 commit 14a2828
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions website/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ const {resolve, join} = require('path');
const webpack = require('webpack');

const KeplerPackage = require('../package');
const {WEBPACK_ENV_VARIABLES, ENV_VARIABLES_WITH_INSTRUCTIONS, RESOLVE_ALIASES} = require('../webpack/shared-webpack-configuration');
const {
WEBPACK_ENV_VARIABLES,
ENV_VARIABLES_WITH_INSTRUCTIONS,
RESOLVE_ALIASES
} = require('../webpack/shared-webpack-configuration');

const LIB_DIR = resolve(__dirname, '..');
const SRC_DIR = resolve(LIB_DIR, './src');
Expand Down Expand Up @@ -69,6 +73,13 @@ const COMMON_CONFIG = {
test: /\.mjs$/,
include: /node_modules\/apache-arrow/,
type: 'javascript/auto'
},
// for compiling @probe.gl, website build started to fail (March, 2024)
{
test: /\.(js)$/,
loader: 'babel-loader',
options: BABEL_CONFIG,
include: /node_modules\/@probe.gl/
}
]
},
Expand Down Expand Up @@ -135,9 +146,7 @@ function logInstruction(msg) {
function validateEnvVariable(variable, instruction) {
if (!process.env[variable]) {
logError(`Error! ${variable} is not defined`);
logInstruction(
`Make sure to run "export ${variable}=<token>" before deploy the website`
);
logInstruction(`Make sure to run "export ${variable}=<token>" before deploy the website`);
logInstruction(instruction);
throw new Error(`Missing ${variable}`);
}
Expand Down

0 comments on commit 14a2828

Please sign in to comment.