Skip to content
Advertisement

Tag: webpack

Can’t npm install local dependency

I’ve been using npm install react-financial-charts successfully. However, I want to include this package locally instead (for reasons), so I checked out the master branch of react-financial-charts from Github. I now have two folders: Inside of my project, my package.json contains: npm run dev will now encounter the compile error corresponding to a basic import statement import { BarSeries }

Can’t load popper.js with Laravel Mix

I recently upgraded to bootstrap 5 and my tooltips/popovers in my application stopped working. I have the following error in console: My understanding is that my Laravel Mix / webpack is failing to include popper.js in its compilation? I don’t understand why it is looking for popper.js.map, shouldn’t everything be compiled into a single file (app.js)? In my webpack.mix.js I

Module not found: Error: You attempted to import babel-preset which falls outside of the project src/ directory

I’m developing an application created using create-react-app But then I needed to use mediainfojs library, this library requires wasm files, and based on what I understood I couldn’t add it using create-react-app, I had to eject it. After ejecting it, I went to mediainfo information on how to add the wasm on the webpack They use the CopyPlugin, but then

webpack production build bundle.js file size is 10mb

I’m working on this react app and when I build the projects the bundle.js file is 10mb so after the deployment it takes time to load the content. Here’s the code: https://github.com/sef-global/scholarx-frontend Here’s my webpack config file: Answer I assume for production build you using your “build” command from packages.json which states: That will trigger webpack “building” of course, but

Webpack fails to parse typescript files. Module parse failed: Unexpected token

I was setting up Typescript and Webpack on an old project of mine and suddenly encountered this error: You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders Then I have created a new project from scratch that goes as follow: webpack.config.js tsconfig.json src/index.ts (sourced from here) …

ModuleFederationPlugin remote module is not being loaded

I have two apps. Container. Webpack App.tsx 2nd App. Webpack ./src/portal.tsx It should work smooth. But it is failing because inside of webpack_modules exists webpack/container/reference/usersweb key, but when React.Lazy requiring remote model it is requiring webpack/container/remote/usersweb/Portal which is not added and app crashes. remoteEntry.js loaded properly and I may see userweb object in the console. dependencies versions “react”: “^17.0.2”, “webpack”:

Advertisement