Skip to main content

All Questions

Tagged with
1 vote
1 answer
655 views

Is there a way to have "local-only" npm scripts so they aren't committed to repo?

I'm developing a React project, which normally runs on port 3000. However, on my machine that port is used by a Windows service that I'll be using for other projects. So, in my package.json for this ...
Jeremy Kolassa's user avatar
1 vote
0 answers
847 views

Unable to start my react application and getting error in webpack server

I don't know where am going wrong Am not sharing all package.json but whatever required am sharing. here is my package.json "scripts": { "develop": "webpack serve --...
user3599302's user avatar
5 votes
4 answers
3k views

Check file exists before launch it in webpack npm scripts

I have a package.json like this: ... "scripts": { "dev": "webpack --config webpack.dev.config.js --mode development --progress --colors", "postdev": &...
G. Goncharov's user avatar
0 votes
1 answer
200 views

Is there a webpack loader / NPM script that compiles solely my SCSS files, similar to how Gulp works?

I've been using Webpack and have found it great for bundling, polyfilling and all sorts of other functions for Javascript, however I wondered if there was a known loader / NPM script that ...
Nathan's user avatar
  • 58
0 votes
0 answers
34 views

webpack: upload sourceMaps to own server via api

I'm trying to log web app errors to my node server but the client code is obfuscated and I need to deobfuscate it on the server. The reason for that is I don't want to expose the source code to the ...
vir us's user avatar
  • 10.8k
0 votes
1 answer
3k views

Laravel mix scripts not watching changes

Im using webpack to run a watch on .js files being changed, but I need to use wildcards instead of specific file names for my project. I'm currently using the commands below and it works fine and ...
Hellodan's user avatar
  • 1,218
2 votes
0 answers
395 views

Webpack vs NPM Scripts

There are certain tasks or procedures that both npm scripts and webpack can perform. For example: Image & SVG optimization CSS and JS minification Process sass, postcss, etc. And more... What I ...
Moshe's user avatar
  • 7,051
2 votes
1 answer
526 views

How to pass an argument with a leading slash to npm script

I have a package.json with some scripts: "scripts": { "build": "webpack-cli --mode production", "build:dev": "webpack-cli --mode development",...
PierBJX's user avatar
  • 2,373
1 vote
2 answers
3k views

webpack production mode "build" - force browser not to read cached file/rebuild fresh files

We have an application (a website) with some React components, css and js compiled with webpack. Our workflow is to npm run start in the /src/ folder while developing locally, which generates CSS and ...
Sarah's user avatar
  • 754
1 vote
0 answers
132 views

NPM "build" not working for my react + webpack project

I am trying to run npm build on an old project I worked on months ago. It worked before after I ran npm install -g win-node-env Now I have formatted my machine but still getting this error '...
Deejay's user avatar
  • 1,077
0 votes
1 answer
197 views

How to pass `--` when used with pre npm scripts

How to pass others flags into npm command that has pre config "prebuild": "npm run build:vendor", "build": "cross-env NODE_ENV=production webpack --env.production -p", When I run npm run build -- --...
ridermansb's user avatar
  • 11.1k
1 vote
1 answer
68 views

Should we have to do this everytime like- install main and dev dependencies and configuring babel,webpack and npm scripts?

I'm a beginner in React and stuck with some problem. I want to create a new react project then every time Will I have to follow the whole guide like - installing main dependencies ,installing dev ...
Abhijeet's user avatar
  • 628
0 votes
1 answer
330 views

Explanation of dotenv and local files workflow using Vue-cli / webpack / nodenv

I've be banging my head against the wall on how to do this. I've been developing on a vue-cli application, and apparently, in the node world, we all believe there exists one development, one staging, ...
sksallaj's user avatar
  • 4,010
0 votes
1 answer
681 views

NPM Start: INVALID VALUES error for SCRIPTS (windows)

Having issues trying to NPM START a react app using IntelliJ on Windows machine. The app was built on a Mac and seems to start on a MAC without issues. It is maybe to do with the formatting of the ...
Spaceman's user avatar
0 votes
0 answers
82 views

does laravel mix compilation removes old files when error occurs?

I have my assets resources compiled and copied to public directory. Later, I added few assets, registered them on webpack.mix.js and run npm run dev. But then I stumbled into some npm error. So my ...
Azima's user avatar
  • 4,151

15 30 50 per page