Category "webpack"

Monaco Editor doesn't load codicons in case of using Webpack

When trying using Monaco Editor in case of using Webpack, codicons are not loaded. I used the monaco-editor-webpack-plugin and followed the instruction, but cur

Webpack conditional build based on configuration values

I'm looking for what ultimately would be a Webpack equivalent to Require.JS's has.js integration. In Require.JS you can compile different code paths based on a

How to support inline comments in PostCSS?

Webpack/PostCSS is unable to process .pcss files which have inline comments: Module build failed: Syntax Error (77:5) Unknown word > 77 | // }

How to describe running npm script in Dockerfile

I described in Dockerfile the command to execute npm script: WORKDIR /usr/src/app/server CMD ["npm", "run", "build"] It's just a webpack script which build my

How to get current filename without path and extension with webpack?

I can get the relative file path with __filename, and sure I could hack it apart to get just the basename with some JS-fu, but I want to do this at compile-time

How to use Tailwind CSS together with SCSS in Laravel/Vue project?

I'm trying to install tailwind css from this guide into an existing laravel/vue project, which uses scss. install packages yarn add -D tailwindcss@latest postcs

how to generate multiple html files with angular-cli builds?

I have an angular project with manual setup (no angular-cli) and configured the build to generate multiple html files using HTML Webpack Plugin. Now, I am plann

Remove some code lines in production distribution files?

I'm using Babel and Webpack to generate ES5 code from ES6. There are some validations that is used to reduce the mistakes i do while coding. class Logger {

How to setup react properly

I have been following the react setup instructions on codecademy: When I type in "npm run build" into the terminal I get this error: I can't seem to figure out

CopyWebpackPlugin copy contents of a directory into the output directory

I want to use CopyWebpackPlugin to copy all the files from a public/ directory to the dist/ directory. However, I need to set my output path as dist/ earlier in

Using formula.js on vue.js

I am trying to use formulja.js in a Vue project. When I import it and try to use PPMT function I am getting this error. I can't define what the error is and how

Webpack 4 file-loader changes svg file content to __webpack_public_path__

I have a project that uses Webpack 4. I use file-loader to handle images in html and fonts in the styles. But for the images, file-loader creates the image in d

Karma/Jasmine times out without running tests

I'm trying to run Karma/Jasmine from Grunt on a project generated with http://newtriks.com/2013/12/31/automating-react-with-yeoman-and-grunt/ Karma launches P

I am getting an error of Html Webpack Plugin in reactjs

My Application was working fine but when I installed material ui npm package my application is giving me this error. Html Webpack Plugin: Error: Child comp

webpack-dev-server error after migrating to angular 13

After my migration from angular 12 to angular 13, i am getting the following error in the console: Also if i change something in my code the browser does not r

CSS Modules Breaking in Production with Create React App

I'm using css modules in a create-react-app project (React V17.0.2 / React-Scripts V4.0.3). All seems well in local but the styles break in production (hosted

i tried to Polyfill modules in webpack 5 but not working (Reactjs)

Hi guys am a newbie in React when i start my project i get the Wepback V5 Error Message Resolve updated : https://github.com/facebook/create-react-app/issues/11

TailwindCSS 3.0 Upgrade overriding button styles

Problem: Button class being overridden by default tailwind base classes. Not sure why my classes on the element aren't being applied. Question: How can I get my

Unexpected token (16:22) You may need an appropriate loader to handle this file type

I get this error when I start my react project with npm start. Doesnt let me move forward at all. ERROR in ./node_modules/react-csv/src/components/Download.js

How can I mock Webpack's require.context in Jest?

Suppose I have the following module: var modulesReq = require.context('.', false, /\.js$/); modulesReq.keys().forEach(function(module) { modulesReq(module);