-
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to build with webpack after v2 #66
Comments
Hi, @esetnik |
@scriptex The issue is solved when using |
Hm, okay, looks like something is missing... |
Hi again, @esetnik, Happy New Year! I've setup a new project with I actually did a pretty simple check if everything works. This is the default import logo from './logo.svg';
import './App.css';
import {
usaStates,
usaCities,
usaStatesFull,
usaStatesWithArea,
usaStatesWithCounties,
usaStatesWithPopulation,
usaStatesWithZipCodes,
} from 'typed-usa-states';
console.log(
usaStates,
usaCities,
usaStatesFull,
usaStatesWithArea,
usaStatesWithCounties,
usaStatesWithPopulation,
usaStatesWithZipCodes
);
function App() {
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<p>
Edit <code>src/App.js</code> and save to reload.
</p>
<a
className="App-link"
href="https://reactjs.org"
target="_blank"
rel="noopener noreferrer"
>
Learn React
</a>
</header>
</div>
);
}
export default App; The app gets correctly built and I am able to see the logs in the browser console. Can you please show me how you use the package? Maybe a small demo or a code sample, just to get the idea of your use case. |
Happy New Year to you too and thanks for getting back to me on this. I'm using it basically the same way as you, except I am running this in a docker container and I noticed something interesting. If I give the container access to large amounts of memory and run |
Can you try to import the array you need directly? I mean instead of using I think this has to do with the way webpack works - it imports the whole index file which contains several pretty large arrays. Then it processes the large dataset and you run out of memory, this is particularly visible in a container environment where the RAM is not enough. The workaround above will import only the array which you need (you can also import others instead of the example I have). Let me know if this makes any difference. |
Hi, @esetnik, did you try what I suggested? Can you please let me know if the issue still persists. |
@scriptex this solved the issue. Thanks! |
The text was updated successfully, but these errors were encountered: