Questions tagged [webpack-cli]

Webpack CLI is a CLI tool for providing a flexible set of commands for custom webpack projects. Use this tag for questions related with the command-line interface for webpack. Do not use for webpack in general.

Webpack CLI is a CLI tool for providing a flexible set of commands for developers to increase speed when setting up a custom webpack project. As of webpack v4, webpack is not expecting a configuration file but often, developers want to create a more custom webpack configuration based on their use-cases and needs. Exactly all these cases with webpack CLI we are providing a set of tools to improve the setup of custom webpack configuration. (1)

  1. Documentation
88 questions
0
votes
1 answer

pacakge.json script no longer working after webpack upgrade

I've been asked to go through the packages our application is using and update them to the latest versions, one of these was upgrading webpack from version 3.11.0 to 5.70.0 which also meant I had to install webpack-cli at version 4.9.2. When the…
lross15
  • 147
  • 2
  • 14
0
votes
1 answer

I recently installed webpack and webpack-dev-server and getting this error on running it on localhost

I recently installed webpack and webpack-dev-server and getting this error on running it from terminal. error: [webpack-cli] Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. -…
0
votes
1 answer

What is the correct syntax for webpack command line options?

I've seen two in the docs ... https://webpack.js.org/configuration/mode/ version 1 webpack --mode=development and https://webpack.js.org/api/cli/ version 2 npx webpack --mode development One has the equal sign and one does not. If they are…
0
votes
2 answers

Javascript & Webpack: Error: Unknown option '--watch-content-base'

I am trying to integrate WebPack into the scripts my package.json file. I was following a video to try and do it and it works fine up until I enter 'npm start'. I get an error message in the terminal reading: [webpack-cli] Error: Unknown option…
stormshadow854
  • 57
  • 1
  • 1
  • 5
0
votes
1 answer

Laravel Mix: npm run dev and npm run watch error-> configuration.loader should be an object

I recently tried to compile my files on development platform by using npm run watch & also npm run dev, but both gave me an error given below: [webpack-cli] Invalid configuration object. Webpack has been initialized using a configuration object…
Hardik Sisodia
  • 615
  • 3
  • 14
  • 37
0
votes
1 answer

npm not start. Error: Cannot find module 'webpack-cli/bin/config-yargs'

when I give npm start comand its show internal/modules/cjs/loader.js:883 throw err: Error: Cannot finde module'webpack-cli/bin/config-yargs' plz help me to solve this problem use os : windows 10 node version is v14.16.1 > chapter15.1@1.0.0 start >…
Fahim Uddin
  • 15
  • 1
  • 5
0
votes
1 answer

webpack-cli Moved webpack.config.js

I used npx webpack-cli init to create my config file. I then decided to moved the created config files into a config/ folder. Now when I run serve it tells me the mode hasnt been set. I imagine I need to update some setting but havent been able to…
Newb 4 You BB
  • 1,205
  • 1
  • 11
  • 30
0
votes
1 answer

When does webpack cli comes into play

How is webpack-cli used in a project? From what I understand, as soon as I enter npm run start on my bash terminal, webpack starts running the webpack config file where I have written rules to convert jsx to js using babel, scss/less to css (correct…
Mr. Rawat
  • 49
  • 1
  • 7
0
votes
1 answer

When calling the webpack CLI, is there a way to know if the build has been successful or failed?

I have a deploy.sh file that will call webpack like: webpack --config webpack.prod.js Does that call return something that I can use to know if the build has been successful or not? Because I'd like to know if my deploy.sh script should continue or…
cbdeveloper
  • 27,898
  • 37
  • 155
  • 336
0
votes
1 answer

webpack 1.js 2.js. For using this command you need to install "1.js"

It's my first time to learn and use webpack. This problem might be too easy even though I have tried to google it for couple of hours. My problem is about to make a package of a js file within webpack. The webpack has been installed globally. I can…
Zanlai Hu
  • 11
  • 3
0
votes
0 answers

Webpack - CSS Minification and Bundle

Almost three hours of research and here I am asking for community help. I have an project with the following CSSs: The ones being used by every page (generics): buttons.css, tables.css, forms.css andlists.css The one being used only by a specific…
0
votes
1 answer

How to specifig the webpack configuration file name using webpack-cli init?

When I use webpack-cli init to create a new webpack configuration, it generates the file webpack.prod.js or webpack.dev.js depending if I answer the question Which module will be the first to enter the application? [default: ./src/index] How can I…
Olivier Boissé
  • 15,834
  • 6
  • 38
  • 56
-1
votes
1 answer

Webpack configuration problem with module.exports entry

I'm trying to configurate webpack but I stuck because of this error. I think the problem is with entry. But when i try to add it without path: like in tutorial i get "(property) path: path.PlatformPath" ',' expected const webpack =…
Kuniooo
  • 34
  • 6
1 2 3 4 5
6