Category "webpack"

Webpack dist folder not getting created in project folder?

Everything running fine, but could not able to find where is my dist folder.I am using publicPath as per documentation, still dist folder seems to coming from m

Hot Reload is not working in my React App

I have created this app with npx create-react-app. After this i have deleted all the files except index.js in src folder. Then Hot reload is not working. I have

Rails, Capistrano - Compilation failed without serving any debug log

I'm trying to deploy my Rails5 app to AWS EC2 instance using Capistrano3. However when it comes to assets compile, it fails without logging any reasons. Where

Karma reload debug.html on test file changes

When running Karma with autoWatch: true and singleRun: false, any change to my unit test files causes the tests to be re-run, and refreshes the Karma webpage at

Setting homepage in package.json doesn't set PUBLIC_URL on build

Following the docs here (Building for Relative Paths), so setting homepage field in package.json doesn't set PUBLIC_URL during the build. Expected behavior %P

Webpack dev server cannot get

I' am using Webpack-4. Current behavior is that when webpack-dev-server is running, files under /build not get updated at all and it is showing the file directo

How to remove folder with npm before build

I've got a scripts "build": "rimraf dist webpack --progress --config webpack/prod.js", But actually,it removed not dist but all file inside webpack folder. But

Import a JavaScript file with Webpack

I got Webpack up and running and now I'd like to split my code into separate files. Lets say I have this code in a separate file: handlebarHelpers.js handleb

Numerous errors when importing web3 into app.js

Attempt to import web3 into App.js gives me 9 errors import React from "react"; import Web3 from "web3"; function App() { return ( <div className="App

Webpack - no output file generated?

I have the following webpack config: var path = require('path') var webpack = require('webpack') module.exports = { entry: { main: './scripts/app/ma

Webpack launch browser automatically

Gulp + live reload serves up my content on localhost and (here's what I'm after) launches the browser automatically at the server url whenever i run the gulp co

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