Category "webpack"

Angular 8 ERROR Error: Unable to find context associated with [object HTMLDivElement]

Just another day in the office, right? What once worked is no longer working. Yay! I am supporting an Angular 8 web application and attempting to kickstart loca

Importing React as default module not working inside Symfony Webpack Encore project

I have a Symfony project, where the frontend-pipeline is built with Webpack Encore, I would like to add React to the project and have a React widget inserted in

using webpack to import files dynamically inside react component

const LongDetail: React.FC<Props> = ({ id, section, placeholder, Fromtolocation, }) => { const { setPrimary, setSecondary, create

Typescript const enum alternative

More and more modern Typescript transpilers have moved toward a strategy of per-module transpilation, which significantly increases build speed, but eliminates

"Module not found" when migrating to Webpack 5

I am trying to migrate my React app to webpack 5.72.0 (from 4.42.1). So I also have webpack-cli (4.9.2), webpack-dev-server (4.8.1) and babel (7.17.9). My probl

Module not found: Error: Can't resolve the typescript file when adding typescript to a CRA app

I'm trying to add typescript to my project and write new components with typescript. I followed the documentation but I'm got this error:can't resolve [the type

How to create a global string in a vue (webpack) project

In my vue project I have a default image that should show up in places around the app when an image is missing or hasn't been uploaded yet. I have various class

Webpack is still parsing unused/unreferenced/not-entrypoint files [duplicate]

I have the minimal Typescript+Webpack setup from the doc, with the following files : Files src/ index.ts // only a console.log in here unused.

React - Module parse failed: You may need an appropriate loader to handle this file type 6:15

Help me with this error: NPM run error my webpack setting: module.export = { module: { rules: [ { test: /\.js$|\.jsx/, exclu

Error: Cannot find module '@babel/plugin-proposal-private-methods'

When checking out of the latest master, I receive the following error when I try to build Webpack. The only noticeable change was a single gem that was installe

webpack-dev-server Disconnect and Trying to reconnect... spam

I just finished an angular project I was working on, but i noticed something in the console, which I'd love to hide if that's possible just to keep everything t

Material UI Styles

Every time I run npm start in vscode I get weird material UI errors like Module parse failed: D:\Websites\rugprints\rugprints\node_modules\@mui\material\node\st

TypeError: Cannot read properties of null (reading 'dataset') in Laravel Jetstream-inertia

This error suddenly appears out of nowhere. i tried reinstalling the npm packages but it doesn't work. but when it works when i create a fresh project of jetstr

Webpack giving an error when hot-reloading my react app

When I make a change to my react-app, and it tries to reload, I get the following error: /path/to/app/node_modules/webpack/lib/node/NodeWatchFileSystem.js:50

React.Lazy not working when consuming Micro frontend with webpack 5 and plugin Module Federation

What is happening is that I am consuming a Micro front-end through module federation, but even using React.Lazy the bundle (remoteEntry) is loaded at the start

How to break eslint or webpack build if any component has imported data from ./Stories/* folder

We have a React/TS project which bacame too big. In this project we use eslint (airbnb) and StoryBook. Our components structure is: /Stories <-- folder for S

Read a file content as a string in Vue

Some other post respond to the same problem (here, here and here) by using raw-loader but from my understanding it is deprecated for webpack v5 (but I'm not sur

'require.context' is not returning file names

I am working on a NextJS app and have created a few functions that facilitate a user uploading files. Files uploaded by the user will live in the "../public/upl

Output webpack bundle with css only

I have multiple webpacks bundles, which work properly. One bundle is built from css files only, and I managed to output a corresponding foo.css. But webpack als

Webpack: Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object

I want to create custom component and build with webpack // packages/button/src/index.js import React from 'react'; function Button({ href }) { return <a