the globally installed webpack is v4.12.1, the webpack referenced by the project package.json is v3.6.0 in the node_modules installed by dint install, and the version is 3.12.0. Which version is used when executing npm run build?
the globally installed webpack is v4.12.1, the webpack referenced by the project package.json is v3.6.0 in the node_modules installed by dint install, and the version is 3.12.0. Which version is used when executing npm run build?
use 3.12.0
compared to the overall situation, the module in the project will be preferred to be configured
configuration in the project "webpack": "4.8.0"
will be subject to version 4.8.0, but generally speaking, we all write as "webpack": "^ 4.8.0",
where ^
means to download the latest version of the current major version
so the configuration in your project should be "webpack": "^ 3.6.0"
, so download it to version 3.12.0
you can take a look at nodeJS's module path resolution rules http://nqdeng.github.io/7-day.. Your situation depends on how your npm run build script is written. If it is node_modules/.bin/webpack, use the version in your node_modules. If it is webpcak, use your global version. If you have strict requirements for the version, you can refer to upstairs to limit the version
.study online tutorials learn to package projects using webpack, a simple code implementation. the entry file index.html of the interface is as follows: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&qu...
< H1 > github address < H1 > error will be reported when using npm run dev const path = require( path ); const merge = require( webpack-merge ); const common = require( . webpack.common.js ); dev-server let BundleAnalyzerPlugin = require( ...
the npm start command runs normally, but the error will be reported when executing with npm run build as follows: syntax error: Unexpected token (Unexpected token (26:6) my index.js: import React, { Component } from react ; import ReactDOM from...
how to set the global URL here, you can use both in the development environment and online. ...
...
after vue-router lazy loading configuration, the page becomes blank this problem does not occur when lazy loading is not configured, when configuring lazy loading *const product = resolve => { require.ensure([ . pages product.vue ], () =>...
require the fs module in the front-end project, but keep reporting errors? fs.readFileSync is not a function introduce code var fs = require( fs ); fs.readFileSync( index.html , utf8 ); this is the webpack configuration file const path = re...
there is a bypass Filter in proxyTable. How do I use it? Is it the return path? Or return true false ...
webpack project upgrade version configuration is as follows: webpack.json "scripts": { "dev": "webpack --mode development", "build": "webpack --mode production", "watch": &quo...
according to the demo in ...
has the following react components: import ". Home.scss"; class Home extends React.Component{ render(){ return ( <div className="box clearfix"> <div className="left"> ...
now my project is to package css and js separately, and the directory structure after packaging is the same as before. before packing: csscssimages.. csscss.. .. : webpack.config.js csscss csscss I would like to ask all the great gods, what ...
question: when I use vue2.5.2 scaffolding to generate a webpack project, I find that it has a configuration node under the automatic generation file build webpack.base.conf.js. What is it and what is it for? ...
refer to antd s custom scheme, introduce babel-plugin-import and react-app-rewired, and add .bablrc file, but not successfully is it necessary to eject? how to make create-react-app support stage-0, without eject? ...
introduce vue.min.js webpack.base.conf.jsexternalsvue tabletable into index.html according to the version used if import vue, removes externals and introduces cdn in main.js, it will load normally could you tell me what s wrong with my use? ...
use webpack to open the front page on the local localhost:8080 port proxy is configured like this: devServer: { port: 8080, contentBase: . dist , proxy: { abc : { target: http: 122.79...
you can develop css, independently and introduce it in the form of link, and the other is webpack development, which is packaged directly to the corresponding page, so what are the advantages and disadvantages of these two ways? ...
in the laravel project, when using the blade template, you often use @ section ( style ) on the page. <style type="text css"> < style> @ endsection or @ section ( script ) <script type="text javascript"> &...
it was fine when the computer was turned off yesterday, and that s how it started today ...
use webpack4.0 to package npm script "webpack --mode development --config webpack.config.dev.js --progress --colors " tell me how to use the-- mode field in the configuration file code to make a judgment ...