-
-
-
- Loading...
-
-
-
-
-
-
-
+
+
+
+ Loading...
+
+
+
+
+
+
-
+
);
};
diff --git a/src/app/components/ResultsList/ResultsList.jsx b/src/app/components/ResultsList/ResultsList.jsx
index 2a663a6dc..f1ee670a1 100644
--- a/src/app/components/ResultsList/ResultsList.jsx
+++ b/src/app/components/ResultsList/ResultsList.jsx
@@ -1,7 +1,6 @@
-import { Text, Card, CardHeading, CardActions, CardContent } from '@nypl/design-system-react-components';
+import { Text, Card, CardHeading, CardActions, CardContent, Link as DSLink } from '@nypl/design-system-react-components';
import React from 'react';
import PropTypes from 'prop-types';
-import { Link } from 'react-router';
import {
isEmpty as _isEmpty,
isArray as _isArray,
@@ -109,7 +108,7 @@ const ResultsList = ({
- {
updateResultSelection({
fromUrl: `${pathname}${search}`,
@@ -117,10 +116,10 @@ const ResultsList = ({
});
}
}
- to={bibUrl}
+ href={bibUrl}
className="title">
{bibTitle}
-
+
@@ -155,16 +154,16 @@ const ResultsList = ({
{
totalPhysicalItems > 3 ?
(
-
{`View All ${itemMessage}`}
-
+
) :
null
diff --git a/src/app/data/appConfig.js b/src/app/data/appConfig.js
index db9a95566..ad95dc2f8 100644
--- a/src/app/data/appConfig.js
+++ b/src/app/data/appConfig.js
@@ -4,14 +4,13 @@ import mapLocations from '../utils/mapLocations';
const appConfig = {
appTitle: 'NYPL | Discovery',
appName: 'discovery',
- displayTitle: process.env.DISPLAY_TITLE || 'Shared Collection Catalog',
+ displayTitle: process.env.DISPLAY_TITLE || 'Research Catalog',
baseUrl:
process.env.BASE_URL || '/research/research-catalog',
- redirectFromBaseUrl: process.env.REDIRECT_FROM_BASE_URL,
- legacyBaseUrl: process.env.LEGACY_BASE_URL,
+ redirectFromBaseUrl: process.env.REDIRECT_FROM_BASE_URL || '/research/collections/shared-collection-catalog',
+ legacyBaseUrl: process.env.LEGACY_BASE_URL || 'https://legacycatalog.nypl.org',
favIconPath: 'https://ux-static.nypl.org/images/favicon.ico',
port: 3001,
- webpackDevServerPort: 3000,
environment: process.env.APP_ENV || 'production',
api: {
platform: {
@@ -43,7 +42,7 @@ const appConfig = {
'https://digital-research-books-api.nypl.org/v3/sfr/search',
},
},
- circulatingCatalog: process.env.CIRCULATING_CATALOG,
+ circulatingCatalog: process.env.CIRCULATING_CATALOG || 'https://borrow.nypl.org',
shepApi: process.env.SHEP_API,
loginUrl: process.env.LOGIN_URL || 'https://login.nypl.org/auth/login',
logoutUrl: process.env.LOGIN_BASE_URL ? process.env.LOGIN_BASE_URL + '/logout' : 'https://login.nypl.org/auth/logout',
@@ -98,7 +97,8 @@ const appConfig = {
nyplHeaderUrl: process.env.NYPL_HEADER_URL || 'https://qa-ds-header.nypl.org',
launchEmbedUrl: process.env.LAUNCH_EMBED_URL || '',
sierraUpgradeAugust2023: process.env.SIERRA_UPGRADE_AUG_2023 === 'true',
- reverseProxyEnabled: process.env.REVERSE_PROXY_ENABLED === 'true'
+ // Hardcoded for now, but should be configurable in the future
+ reverseProxyEnabled: true, //process.env.REVERSE_PROXY_ENABLED === 'true'
};
export default appConfig;
diff --git a/src/app/pages/HoldRequest.jsx b/src/app/pages/HoldRequest.jsx
index 1956ab909..4a111f1be 100644
--- a/src/app/pages/HoldRequest.jsx
+++ b/src/app/pages/HoldRequest.jsx
@@ -4,7 +4,7 @@ import axios from 'axios';
import PropTypes from 'prop-types';
import React from 'react';
import { connect } from 'react-redux';
-import { Link, withRouter } from 'react-router';
+import { withRouter } from 'react-router';
import {
isArray as _isArray,
isEmpty as _isEmpty,
@@ -233,12 +233,12 @@ export class HoldRequest extends React.Component {
const bibLink =
bibId && title ? (
-
{title}
-
+
) : null;
const callNo =
diff --git a/src/client/App.jsx b/src/client/App.jsx
index ec4c2d2cf..75ab2b9de 100644
--- a/src/client/App.jsx
+++ b/src/client/App.jsx
@@ -8,7 +8,6 @@ import ReactDOM from 'react-dom';
import { Router, browserHistory, applyRouterMiddleware } from 'react-router';
import a11y from 'react-a11y';
import { Provider } from 'react-redux';
-import useScroll from 'react-router-scroll/lib/useScroll';
import store from '../app/stores/Store';
import './styles/main.scss';
@@ -30,7 +29,7 @@ window.onload = () => {
{routes.client}
diff --git a/src/client/styles/components/FilterPopup.scss b/src/client/styles/components/FilterPopup.scss
index a445ce375..d25169ffe 100644
--- a/src/client/styles/components/FilterPopup.scss
+++ b/src/client/styles/components/FilterPopup.scss
@@ -258,7 +258,8 @@
.clear-filters-button {
padding: 7px 16px;
margin-bottom: 20px;
- @include border-radius(5px);
+ // TODO
+ // @include border-radius(5px);
@include media($nypl-breakpoint-small) {
margin-bottom: 0;
diff --git a/src/client/styles/main.scss b/src/client/styles/main.scss
index d309aa728..eb72c797d 100644
--- a/src/client/styles/main.scss
+++ b/src/client/styles/main.scss
@@ -14,9 +14,39 @@ App-specific utilities and defaults
/*
Import style rules from NYPL React module components
*/
-@import "~@nypl/dgx-header-component/dist/styles/main";
-@import "~@nypl/dgx-react-footer/dist/styles/styles";
-@import "components/**/*.scss";
+@import "components/Drbb/Drbb";
+@import "components/SubjectHeadings/AdditionalSubjectHeadingsButton";
+@import "components/SubjectHeadings/AlphabeticalPagination";
+@import "components/SubjectHeadings/BibsList";
+@import "components/SubjectHeadings/NestedTableHeader";
+@import "components/SubjectHeadings/PreviewComponents";
+@import "components/SubjectHeadings/SubjectHeading";
+@import "components/SubjectHeadings/SubjectHeadingSearch";
+@import "components/SubjectHeadings/SubjectHeadingShow";
+@import "components/SubjectHeadings/SubjectHeadingsTable";
+@import "components/SubjectHeadings/SubjectHeadingsTableHeader";
+@import "components/AccountPage";
+@import "components/AdvancedSearch";
+@import "components/aeonRequestButton";
+@import "components/BibDetails";
+@import "components/BibPage";
+@import "components/FilterPopup";
+@import "components/HoldConfirmation";
+@import "components/HoldRequest";
+@import "components/Home";
+@import "components/ItemFilter";
+@import "components/ItemFilters";
+@import "components/ItemsContainer";
+@import "components/ItemTable";
+@import "components/LoadingLayer";
+@import "components/Notification";
+@import "components/Redirect404";
+@import "components/SccContainer";
+@import "components/Search";
+@import "components/SelectedFilters";
+@import "components/SubjectHeadings";
+@import "components/SubNav";
+@import "components/TimedLogoutModal";
@import "style-v2.scss";
// From older DS version
diff --git a/src/client/styles/utils/mixins.scss b/src/client/styles/utils/mixins.scss
index da1aa1d21..2f9439b48 100644
--- a/src/client/styles/utils/mixins.scss
+++ b/src/client/styles/utils/mixins.scss
@@ -12,10 +12,12 @@
}
@mixin visuallyHidden {
- position: absolute;
- width: 1px;
+ clip: rect(1px, 1px, 1px, 1px);
height: 1px;
overflow: hidden;
+ position: absolute !important;
+ width: 1px;
+ word-wrap: normal;
}
@mixin displayVisuallyHidden {
diff --git a/src/server/ApiRoutes/SubjectHeading.js b/src/server/ApiRoutes/SubjectHeading.js
index e20b449ac..ef33844de 100644
--- a/src/server/ApiRoutes/SubjectHeading.js
+++ b/src/server/ApiRoutes/SubjectHeading.js
@@ -74,7 +74,7 @@ const bibsAjax = (req, res) => {
bibsSource: 'discoveryApi',
});
}
-
+
return shepApiBibsCall();
};
diff --git a/src/server/ApiRoutes/User.js b/src/server/ApiRoutes/User.js
index 3e4a2a621..27b9c39ba 100644
--- a/src/server/ApiRoutes/User.js
+++ b/src/server/ApiRoutes/User.js
@@ -9,7 +9,9 @@ function requireUser(req, res) {
const originalUrl = req.originalUrl.replace(new RegExp(`^${appConfig.baseUrl}/api/`), `${appConfig.baseUrl}/`)
// TODO: Express 4.x strips the port from req.hostname, inconveniencing
// local development. May cautiously retrieve it from headers or local config
- const fullUrl = encodeURIComponent(`${req.protocol}://${req.hostname}${originalUrl}`);
+ const fullUrl = encodeURIComponent(`${req.protocol}://${req.hostname}${originalUrl}`)
+ // Don't allow internal hostname ([qa-]discovery.nypl.org) to be used in redirect:
+ .replace('discovery.nypl.org', 'www.nypl.org');
redirect = `${appConfig.loginUrl}?redirect_uri=${fullUrl}`;
if (!req.originalUrl.includes('/api/')) {
res.redirect(redirect);
diff --git a/src/server/routes/nyplApiClient/index.js b/src/server/routes/nyplApiClient/index.js
index 24ed51729..3bbed2942 100644
--- a/src/server/routes/nyplApiClient/index.js
+++ b/src/server/routes/nyplApiClient/index.js
@@ -16,7 +16,7 @@ if (kmsEnvironment === 'encrypted') {
decryptKMS = (key) => {
const params = {
- CiphertextBlob: new Buffer(key, 'base64'),
+ CiphertextBlob: Buffer.from(key, 'base64'),
};
return new Promise((resolve, reject) => {
diff --git a/src/server/routes/nyplApiClient/kmsClientHelper.js b/src/server/routes/nyplApiClient/kmsClientHelper.js
index 2b424db12..47a3dd0a9 100644
--- a/src/server/routes/nyplApiClient/kmsClientHelper.js
+++ b/src/server/routes/nyplApiClient/kmsClientHelper.js
@@ -23,7 +23,7 @@ const kmsClientHelper = (options) => {
decryptKMS = (key) => {
const params = {
- CiphertextBlob: new Buffer(key, 'base64'),
+ CiphertextBlob: Buffer.from(key, 'base64'),
};
return new Promise((resolve, reject) => {
diff --git a/src/views/index.ejs b/src/views/index.ejs
index 568eb25ce..b6c1396c1 100644
--- a/src/views/index.ejs
+++ b/src/views/index.ejs
@@ -41,6 +41,8 @@
<% if (isProduction) { %>
+ <% } else { %>
+
<% } %>
@@ -72,7 +74,7 @@
<% if (isProduction) { %>
<% } else { %>
-
+
<% } %>
diff --git a/test/helpers/browser.js b/test/helpers/browser.js
index 5220a1751..4f367e5de 100644
--- a/test/helpers/browser.js
+++ b/test/helpers/browser.js
@@ -1,6 +1,7 @@
require('dotenv').config({ path: 'test.env' });
-
+require('@babel/register')();
require('mock-local-storage');
+
global.window = {};
const enzyme = require('enzyme');
@@ -8,8 +9,6 @@ const Adapter = require('enzyme-adapter-react-16');
enzyme.configure({ adapter: new Adapter() });
-require('@babel/register')();
-
const jsdom = require('jsdom').jsdom;
const exposedProperties = ['window', 'navigator', 'document'];
@@ -18,6 +17,13 @@ global.document = jsdom('');
const { document } = global;
global.window = document.defaultView;
+window.requestAnimationFrame = function(callback) {
+ setTimeout(callback, 0);
+};
+window.cancelAnimationFrame = function(callback) {
+ setTimeout(callback, 0);
+};
+
Object.keys(document.defaultView).forEach((property) => {
if (typeof global[property] === 'undefined') {
exposedProperties.push(property);
diff --git a/test/unit/Application.test.js b/test/unit/Application.test.js
index 3cda4ca68..12e69a059 100644
--- a/test/unit/Application.test.js
+++ b/test/unit/Application.test.js
@@ -5,8 +5,7 @@ import { expect } from 'chai';
import { shallow } from 'enzyme';
import { stub } from 'sinon';
-import WrappedApplication, { Application } from '@Application';
-import { Header, navConfig } from '@nypl/dgx-header-component';
+import { Application } from '@Application';
import { mockRouterContext } from '../helpers/routing';
import { breakpoints } from '../../src/app/data/constants';
diff --git a/test/unit/HoldRequest.test.js b/test/unit/HoldRequest.test.js
index adba54131..e02c72356 100644
--- a/test/unit/HoldRequest.test.js
+++ b/test/unit/HoldRequest.test.js
@@ -76,7 +76,6 @@ describe('HoldRequest', () => {
it('should display the item title.', () => {
const item = component.find('.item');
- expect(item.find('#item-link')).to.have.length(2);
expect(item.find('#item-link').at(1).text()).to.equal('Harry Potter');
});
diff --git a/webpack-dev.config.js b/webpack-dev.config.js
new file mode 100644
index 000000000..f61286ae5
--- /dev/null
+++ b/webpack-dev.config.js
@@ -0,0 +1,93 @@
+const path = require('path');
+const webpack = require('webpack');
+
+const appEnv = process.env.APP_ENV ? process.env.APP_ENV : 'production';
+
+module.exports = {
+ mode: 'development',
+ entry: {
+ bundle: path.resolve(__dirname, 'src/client/App.jsx'),
+ },
+ resolve: {
+ extensions: ['.js', '.jsx', '.scss', '.png'],
+ },
+ output: {
+ filename: '[name].js',
+ path: path.resolve(__dirname, 'dist'),
+ clean: true,
+ publicPath: '/',
+ },
+ devtool: 'inline-source-map',
+ devServer: {
+ static: {
+ directory: path.join(__dirname, 'dist'),
+ },
+ port: 3001,
+ open: true,
+ hot: true,
+ compress: true,
+ historyApiFallback: true,
+ },
+ module: {
+ rules: [
+ {
+ test: /\.(png|jpe?g|gif)$/i,
+ use: [
+ {
+ loader: 'file-loader',
+ },
+ ],
+ include: path.resolve(__dirname, 'src'),
+ exclude: /node_modules/,
+ },
+ {
+ test: /\.jsx?$/,
+ exclude: /(node_modules)/,
+ use: {
+ loader: 'babel-loader',
+ options: {
+ presets: ['@babel/preset-env', '@babel/preset-react'],
+ },
+ },
+ },
+ {
+ test: /\.scss?$/,
+ use: [
+ 'style-loader',
+ 'css-loader',
+ 'sass-loader',
+ ],
+ },
+ ],
+ },
+ plugins: [
+ new webpack.DefinePlugin({
+ loadA11y: process.env.loadA11y || false,
+ appEnv: JSON.stringify(appEnv),
+ 'process.env': {
+ SHEP_API: JSON.stringify(process.env.SHEP_API),
+ LOGIN_URL: JSON.stringify(process.env.LOGIN_URL),
+ LOGIN_BASE_URL: JSON.stringify(process.env.LOGIN_BASE_URL),
+ LEGACY_BASE_URL: JSON.stringify(process.env.LEGACY_BASE_URL),
+ CLOSED_LOCATIONS: JSON.stringify(process.env.CLOSED_LOCATIONS),
+ RECAP_CLOSED_LOCATIONS: JSON.stringify(
+ process.env.RECAP_CLOSED_LOCATIONS,
+ ),
+ NON_RECAP_CLOSED_LOCATIONS: JSON.stringify(
+ process.env.NON_RECAP_CLOSED_LOCATIONS,
+ ),
+ OPEN_LOCATIONS: JSON.stringify(process.env.OPEN_LOCATIONS),
+ DISPLAY_TITLE: JSON.stringify(process.env.DISPLAY_TITLE),
+ ITEM_BATCH_SIZE: JSON.stringify(process.env.ITEM_BATCH_SIZE),
+ CIRCULATING_CATALOG: JSON.stringify(process.env.CIRCULATING_CATALOG),
+ BASE_URL: JSON.stringify(process.env.BASE_URL),
+ WEBPAC_BASE_URL: JSON.stringify(process.env.WEBPAC_BASE_URL),
+ FEATURES: JSON.stringify(process.env.FEATURES),
+ SHEP_BIBS_LIMIT: JSON.stringify(process.env.SHEP_BIBS_LIMIT),
+ LAUNCH_EMBED_URL: JSON.stringify(process.env.LAUNCH_EMBED_URL),
+ REVERSE_PROXY_ENABLED: JSON.stringify(process.env.REVERSE_PROXY_ENABLED),
+ SIERRA_UPGRADE_AUG_2023: JSON.stringify(process.env.SIERRA_UPGRADE_AUG_2023)
+ },
+ }),
+ ],
+};
diff --git a/webpack.config.js b/webpack.config.js
index fab96dfe9..6142cccc5 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -1,50 +1,59 @@
const path = require('path');
const webpack = require('webpack');
-const { merge } = require('webpack-merge');
-const CleanBuild = require('clean-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
-const globImporter = require('node-sass-glob-importer');
-// TODO: This would ideally not be set in this file
-// Add this to a ticket for future refactor
-// The purpose of this is to allow for a local run of npm run dist
-// In order to test a production build on a local machine.
-require('dotenv').config();
-// const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
-// References the applications root path
-const ROOT_PATH = path.resolve(__dirname);
-
-// Sets the variable as either development or production
-const ENV = process.env.NODE_ENV || 'development';
-// Sets appEnv so the the header component will point to the search app on either Dev or Prod
const appEnv = process.env.APP_ENV ? process.env.APP_ENV : 'production';
-// Holds the common settings for any environment
-const commonSettings = {
- // path.resolve - resolves to an absolute path
- // This is the path and file of our top level
- // React App that is to be rendered.
+module.exports = {
+ mode: 'production',
entry: {
- app: [
- 'core-js/stable',
- path.resolve(ROOT_PATH, 'src/client/App.jsx'),
- ],
+ bundle: path.resolve(__dirname, 'src/client/App.jsx'),
},
resolve: {
extensions: ['.js', '.jsx'],
},
output: {
- // Sets the output path to ROOT_PATH/dist
- path: path.resolve(ROOT_PATH, 'dist'),
- // Sets the name of the bundled application files
- // Additionally we can isolate vendor files as well
- filename: 'bundle.js',
+ filename: '[name].js',
+ path: path.resolve(__dirname, 'dist'),
+ clean: true,
+ publicPath: '/',
+ },
+ module: {
+ rules: [
+ {
+ test: /\.(png|jpe?g|gif)$/i,
+ include: path.resolve(__dirname, 'src'),
+ use: [
+ {
+ loader: 'file-loader',
+ },
+ ],
+ },
+ {
+ test: /\.jsx?$/,
+ exclude: /(node_modules)/,
+ use: {
+ loader: 'babel-loader',
+ options: {
+ presets: [
+ '@babel/preset-env',
+ '@babel/preset-react',
+ ],
+ },
+ },
+ },
+ {
+ test: /\.scss$/,
+ include: path.resolve(__dirname, 'src'),
+ use: [
+ MiniCssExtractPlugin.loader,
+ 'css-loader',
+ 'sass-loader',
+ ],
+ },
+ ],
},
plugins: [
- // Cleans the Dist folder after every build.
- // Alternately, we can run rm -rf dist/ as
- // part of the package.json scripts.
- new CleanBuild(['dist']),
new MiniCssExtractPlugin({
filename: 'styles.css',
}),
@@ -72,187 +81,10 @@ const commonSettings = {
FEATURES: JSON.stringify(process.env.FEATURES),
SHEP_BIBS_LIMIT: JSON.stringify(process.env.SHEP_BIBS_LIMIT),
LAUNCH_EMBED_URL: JSON.stringify(process.env.LAUNCH_EMBED_URL),
- REVERSE_PROXY_ENABLED: JSON.stringify(process.env.REVERSE_PROXY_ENABLED)
+ REVERSE_PROXY_ENABLED: JSON.stringify(process.env.REVERSE_PROXY_ENABLED),
+ NODE_ENV: JSON.stringify('production'),
+ SIERRA_UPGRADE_AUG_2023: JSON.stringify(process.env.SIERRA_UPGRADE_AUG_2023)
},
}),
- // new BundleAnalyzerPlugin({
- // // Can be `server`, `static` or `disabled`.
- // // In `server` mode analyzer will start HTTP server to show bundle report.
- // // In `static` mode single HTML file with bundle report will be generated.
- // // In `disabled` mode you can use this plugin to just generate Webpack Stats JSON file by
- // // setting `generateStatsFile` to `true`.
- // analyzerMode: 'static',
- // // Host that will be used in `server` mode to start HTTP server.
- // // analyzerHost: '127.0.0.1',
- // // Port that will be used in `server` mode to start HTTP server.
- // // analyzerPort: 8888,
- // // Path to bundle report file that will be generated in `static` mode.
- // // Relative to bundles output directory.
- // reportFilename: 'report.html',
- // // Module sizes to show in report by default.
- // // Should be one of `stat`, `parsed` or `gzip`.
- // // See "Definitions" section for more information.
- // defaultSizes: 'parsed',
- // // Automatically open report in default browser
- // openAnalyzer: false,
- // // If `true`, Webpack Stats JSON file will be generated in bundles output directory
- // generateStatsFile: false,
- // // Name of Webpack Stats JSON file that will be generated if `generateStatsFile` is `true`.
- // // Relative to bundles output directory.
- // statsFilename: 'stats.json',
- // // Options for `stats.toJson()` method.
- // // For example you can exclude sources of your modules from stats file with `source: false`
- // // option.
- // // See more options here: https://github.com/webpack/webpack/blob/webpack-1/lib/Stats.js#L21
- // statsOptions: null,
- // // Log level. Can be 'info', 'warn', 'error' or 'silent'.
- // logLevel: 'info',
- // }),
],
-};
-
-/**
- * DEVELOPMENT ENVIRONMENT CONFIG
- * ------------------------------
- * Uses the webpack-merge plugin to merge
- * the common app configuration with the
- * additional development specific settings.
- *
- */
-// Need to configure webpack-dev-server and hot-reload
-// module correctly.
-if (ENV === 'development') {
- // Load dev depencies:
- console.log('webpack dev');
-
- module.exports = merge(commonSettings, {
- mode: 'development',
- devtool: 'inline-source-map',
- entry: {
- app: [
- 'webpack-dev-server/client?http://localhost:3000',
- 'webpack/hot/only-dev-server',
- ],
- },
- output: {
- publicPath: 'http://localhost:3000/',
- },
- plugins: [new webpack.HotModuleReplacementPlugin()],
- resolve: {
- modules: ['node_modules'],
- extensions: ['.js', '.jsx', '.scss', '.png'],
- },
- module: {
- rules: [
- {
- test: /\.(png|jpe?g|gif)$/i,
- use: [
- {
- loader: 'file-loader',
- },
- ],
- include: path.resolve(ROOT_PATH, 'src'),
- exclude: /node_modules/,
- },
- {
- test: /\.jsx?$/,
- exclude: /(node_modules|bower_components)/,
- use: {
- loader: 'babel-loader',
- options: {
- presets: ['@babel/preset-env'],
- },
- },
- },
- {
- test: /\.scss?$/,
- use: [
- 'style-loader',
- 'css-loader',
- {
- loader: 'sass-loader',
- options: {
- importer: globImporter(),
- },
- },
- ],
- include: path.resolve(ROOT_PATH, 'src'),
- },
- ],
- },
- });
-}
-
-/**
- * PRODUCTION ENVIRONMENT CONFIG
- * ------------------------------
- * Uses the webpack-merge plugin to merge
- * the common app configuration with the
- * additional production specific settings.
- *
- */
-if (ENV === 'production') {
- module.exports = merge(commonSettings, {
- mode: 'production',
- devtool: 'source-map',
- optimization: {
- minimize: true,
- },
- module: {
- rules: [
- {
- test: /\.(png|jpe?g|gif)$/i,
- include: path.resolve(ROOT_PATH, 'src'),
- use: [
- {
- loader: 'file-loader',
- },
- ],
- },
- {
- test: /\.jsx?$/,
- exclude: /(node_modules|bower_components)/,
- use: 'babel-loader',
- },
- {
- test: /\.scss$/,
- include: path.resolve(ROOT_PATH, 'src'),
- use: [
- MiniCssExtractPlugin.loader,
- 'css-loader',
- {
- loader: 'sass-loader',
- options: {
- sourceMap: true,
- importer: globImporter(),
- },
- },
- ],
- },
- ],
- },
- plugins: [
- new webpack.DefinePlugin({
- 'process.env': {
- NODE_ENV: JSON.stringify('production'),
- SHEP_API: process.env.SHEP_API,
- LOGIN_URL: process.env.LOGIN_URL,
- LOGIN_BASE_URL: process.env.LOGIN_BASE_URL,
- LEGACY_BASE_URL: process.env.LEGACY_BASE_URL,
- CLOSED_LOCATIONS: process.env.CLOSED_LOCATIONS,
- RECAP_CLOSED_LOCATIONS: JSON.stringify(
- process.env.RECAP_CLOSED_LOCATIONS,
- ),
- NON_RECAP_CLOSED_LOCATIONS: JSON.stringify(
- process.env.NON_RECAP_CLOSED_LOCATIONS,
- ),
- DISPLAY_TITLE: JSON.stringify(process.env.DISPLAY_TITLE),
- ITEM_BATCH_SIZE: JSON.stringify(process.env.ITEM_BATCH_SIZE),
- CIRCULATING_CATALOG: JSON.stringify(process.env.CIRCULATING_CATALOG),
- WEBPAC_BASE_URL: JSON.stringify(process.env.WEBPAC_BASE_URL),
- SIERRA_UPGRADE_AUG_2023: JSON.stringify(process.env.SIERRA_UPGRADE_AUG_2023)
- },
- }),
- ],
- });
-}
+};
\ No newline at end of file