You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi. I'm struggling to config my project to be able to use third party dependency (react-select). I'm not familiar with webpack at all, just assumed that this is the only way.
The second thing I would like to accomplish is debugging. Is it even possible while having referenced just main.js, runtime.js and vendor.js?
Or maybe there is another way to use react libraries, that would better fit my needs?
Let me show what I currently have: webpack.config.js:
// @ts-nocheck
import * as _React from 'react';
import * as _PropTypes from 'prop-types'; // @types/prop-types is a dependency of `@types/react`
//import * as Select from 'react-select';
declare global {
//const React: typeof _ReactJS; // the React types _also_ exported by the React namespace, but export them again here just in case.
const PropTypes: typeof _PropTypes;
//const Select: typeof Select;
}
React/expose-components.ts:
uncommenting imports and assignments to global obj results 'window is not defined'
//@ts-nocheck
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import * as ReactDOMServer from 'react-dom/server';
import DataManagementMain from './data-management/main';
// any css-in-js or other libraries you want to use server-side
//import * as Select from 'react-select';
//import makeAnimated from 'react-select/animated';
global.React = React;
global.ReactDOM = ReactDOM;
global.ReactDOMServer = ReactDOMServer;
//global.Select = Select;
//global.makeAnimated = makeAnimated;
globalThis.Components = { DataManagementMain };
React/data-management/staff.tsx (file, where I have been trying to use Select)
...
import { ColumnSetting, GroupedModificationComponentProps, GroupedTable, GroupedTableData, TableData } from "./table";
//import * as Select from 'react-select';
//import makeAnimated from 'react-select/animated';
interface StaffPersonData extends TableData {
...
Hi. I'm struggling to config my project to be able to use third party dependency (react-select). I'm not familiar with webpack at all, just assumed that this is the only way.
The second thing I would like to accomplish is debugging. Is it even possible while having referenced just
main.js
,runtime.js
andvendor.js
?Or maybe there is another way to use react libraries, that would better fit my needs?
Let me show what I currently have:
webpack.config.js
:tsconfig.json
:types/index.d.ts
:React/expose-components.ts
:uncommenting imports and assignments to global obj results 'window is not defined'
React/data-management/staff.tsx
(file, where I have been trying to useSelect
).babelrc
Program.cs
package.json
The text was updated successfully, but these errors were encountered: