Category "webpack"

Use both Tailwind and SCSS with cssbundling-rails

In the Rails 6 project I'm working on, we're looking upgrade from webpacker to cssbundling-rails and jsbundling-rails. We currently use Tailwind with SCSS, but

webpack creating 100's of js chunks crippling performance for a single page view with vue cli

We have a vuejs 2 project. We needed some function of dayjs. We abstracted the dayjs into a single utility file and following the guide ended up with this: impo

Next.js and Webpack inline Javascript or CSS ressources

I have the following use case: I need to generate static files with React and Next.js. For that I extended the next.config.js with the following content: module

URIError: Failed to decode param '/%PUBLIC_URL%/favicon.ico'

I am new to webpack and I got the babel loader and css loader to work and project compiles successfully but when I try to access via browser I get the below err

how to configure webpack HMR with express

package.json scripts: "scripts": { "build": "webpack --config config/webpack.prod.config.js", "dev": "webpack --config config/webpack.dev.config.js &a

Module not found: Error: Can't resolve 'path'

I have an Angular CLI project which I just upgraded to Angular 6. Now when I try to build my app, I get the following errors: ERROR in ./node_modules/postcss/

Module parse failed? I need help setting up Babel

I'm writing my first JavaScript library and I'm testing it locally with a React project. I'm not seeing any Typescript errors when I'm writing my code but when

Module build failed (from ./node_modules/eslint-loader/dist/cjs.js): TypeError: Cannot read properties of undefined (reading 'getFormatter')

I am running a simple React/Django app with webpack that is receiving this error on build: ERROR in ./src/index.js Module build failed (from ./node_modules/esli

Laravel Mix + BrowserSync infinite loading out of the box

Something's making my out-of-the-box Laravel project with browser-sync and the browser-sync-webpack-plugin installed to load infinitely on the browser-sync page

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