Skip to content

Commit

Permalink
Bring back code
Browse files Browse the repository at this point in the history
  • Loading branch information
tiberiuichim committed Apr 29, 2022
1 parent 6046446 commit 033704b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 31 deletions.
3 changes: 3 additions & 0 deletions razzle.extend.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ const modify = (config, { target, dev }, webpack) => {
const searchlibConf = jsConfig.compilerOptions.paths.searchlib;
if (!searchlibConf) return config;

// because we load @eeacms/search "through the back door" (via webpack
// aliases and jsconfig.json), we need to instruct babel to include this
// package as well
const babelLoaderFinder = makeLoaderFinder('babel-loader');
const babelLoader = config.module.rules.find(babelLoaderFinder);
const { include } = babelLoader;
Expand Down
35 changes: 4 additions & 31 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
import 'regenerator-runtime/runtime'; // compatibility with react-speech-recognition

// import installGlobalsearch from '@eeacms/globalsearch';
// import installDatahub from '@eeacms/datahub';
// import { registry } from '@eeacms/search';
// import codeSVG from '@plone/volto/icons/code.svg';
// import SearchBlockView from './SearchBlock/SearchBlockView';
// import SearchBlockEdit from './SearchBlock/SearchBlockEdit';
import { registry } from '@eeacms/search';
import codeSVG from '@plone/volto/icons/code.svg';
import SearchBlockView from './SearchBlock/SearchBlockView';
import SearchBlockEdit from './SearchBlock/SearchBlockEdit';
// import LeftColumnLayout from './components/Layout/LeftColumnLayout';

import SelectWidget from './SearchBlock/SelectWidget';

const applyConfig = (config) => {
return config;
config.widgets.id.qa_queryTypes = SelectWidget;
config.settings.searchlib = registry;

Expand Down Expand Up @@ -55,28 +52,4 @@ const applyConfig = (config) => {
return config;
};

// TODO: this should be moved into its own volto addon
// export const installGlobalSearch = (config) => {
// config.settings.searchlib = installGlobalsearch(config.settings.searchlib);
//
// const { globalsearch } = config.settings.searchlib.searchui;
//
// // Tweak the searchlib config to use the middleware instead of the index
// globalsearch.elastic_index = '_es/globalsearch';
//
// return config;
// };

// TODO: this should be moved into its own volto addon
// export const installDataHub = (config) => {
// config.settings.searchlib = installDatahub(config.settings.searchlib);
//
// const { datahub } = config.settings.searchlib.searchui;
//
// // Tweak the searchlib config to use the middleware instead of the index
// datahub.elastic_index = '_es/globalsearch';
//
// return config;
// };
//
export default applyConfig;

0 comments on commit 033704b

Please sign in to comment.