Category "webpack"

Error: Cannot find module 'webpack' when running npm start on angular 2 webpack starter

I have cloned from here: https://github.com/AngularClass/angular2-webpack-starter Installed, with some warnings: npm install typings webpack-dev-server rimra

What is the type of the webpack config function when it comes to TypeScript?

I cannot figure out the type of the webpack configuring function when the config is written in TypeScript. Currently I export an object whose type is Configurat

How to inspect files compiled by webpack before they are emitted

I'm using webpack (v4) to package assets for my UI application. I'd like to run a function that checks the contents of the compiled assets for invalid strings

How to include a global file type declaration in a TypeScript (Node.js) package

I'm working on a package that I am planning to publish publicly on npmjs. Let's call it the "text package". I would like that by default when installing that pa

How to add custom webpack config with ionic v4 and react?

I have set up a project using ionic framework v4 with React and wish to add a webpack loader to allow importing graphql queries from .graphql files, as describe

background-image URL not loading using Webpack

Basically I am trying to have an image display in the background of a container, but it isn't loading. I have tried various paths as it isn't entirely clear to

In Webpack, how do I generate a content hash for only some files?

Webpack has a caching mechanism: https://webpack.js.org/guides/caching/ That allows you to generate a content hash for your JS files. Suppose I'm building many

How to fix NextJS webpack error: You may need an appropriate loader to handle this file type, currently no loaders are configured

I generated NextJS project using TypeScript template and I want to add my Storybook to the project. Storybook is written in TypeScript. When I'm adding Storyboo

Trying to remove 'react-hot-loader' from final bundle using webpack ignorePlugin

This is what the react-hot-loader DOCs says: https://www.npmjs.com/package/react-hot-loader Note: You can safely install react-hot-loader as a regular

Vuejs Webpack Compression Plugin not compressing

I need help debugging Webpack's Compression Plugin. SUMMARY OF PROBLEM Goal is to enable asset compression and reduce my app's bundle size. Using the Brotli alg

Cannot resolve load path in webpack

I try to migrate gulp+browserify to webpack and I have problems resolving path. Here is my project tree : /path/to/project ├── webpack.confi

proxy not working for react and node

I'm having issues with the proxy I set up. This is my root package.json file: "scripts": { "client": "cd client && yarn dev-server", "server"

Need to install 'webpack-dev-server'

I have cloned a repo from GitHub for a project. I've already installed node (-v 14.17.5) and npm (-v7.20.6), however when I run npm start I get the following co

Need to install 'webpack-dev-server'

I have cloned a repo from GitHub for a project. I've already installed node (-v 14.17.5) and npm (-v7.20.6), however when I run npm start I get the following co

Laravel mix, webpack, terser - strip console log in production bundle

I'm trying to strip console log and console debugs from the production build of my laravel + react app. I found many different solutions but none seemed suitabl

Getting "Html Webpack Plugin: Error: Child compilation failed: Module.createRequire is not a function" when trying to run React app

Trying to run npm start within my React app is causing the following: Error: Child compilation failed: Module.createRequire is not a function - child-c

TS2307: Cannot find module './images/logo.png'

I'm trying to import a local png image into my ts webpack project, and I get the following error. TS2307: Cannot find module './images/logo.png'. All my othe

How to import a compiled module from one app to another in npm workspace using webpack?

I'm using npm workspaces for the first time(node version v16.15.0 and npm v8.5.5 ). I need to import components from a react app in another app with some minor

Angular: 7.2.1 ES6 class ReferenceError : Cannot access 'X' before initialization

I'm having the following TypeScript class export class Vehicule extends TrackableEntity { vehiculeId: number; constructor() { super(); return supe

Angular4 micro front-ends

We have an application composed by multiple services, where there is a edge service routing and load balancing all request to the individual services. The back