In the package.json package
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"dev": "webpack-dev-server --open",
"bulid": "webpack -p"
},
“bulid”: “webpack -p” – The P instruction can no longer be recognized and has been eliminated. Change to:
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"dev": "webpack-dev-server --open",
"bulid": "webpack"
},
CSS loader update
In the old version, CSS loader cannot recognize the URL address. In addition, URL loader is cumbersome, but it can automatically generate Base64 images to reduce the pressure on the server. The new version directly supports URL parsing, but obviously this function can also be configured:
module.exports = {
module: {
rules: [
{
test: /\.css$/i,
loader: "css-loader",
options: {
url: true,
},
},
],
},
};
Disable the URL, but it seems that the CSS attribute and ID selector will not work after configuration;
Vue loader configuration encountered great obstacles
When using Vue loader, you must download Vue template compiler to parse Vue files
Configuration options:
const VueLoaderPlugin = require('vue-loader/lib/plugin');//Must Import
module.exports = {
module: {
rules: [
{ test: /\.vue/, use: ['vue-loader'] }
]
},
plugins: [new VueLoaderPlugin()]//Must configurate
}
But there was a problem after I configured it
All the methods on the Internet are invalid. Finally, it is found that Vue is not installed
npm i vue
There are also problems after installation, and the error is still reported
Finally, you can see that the version numbers of Vue template compiler and Vue are different, so they are updated The problem was finally solved after Vue template compiler
Read More:
- Module not found: Error: Can‘t resolve ‘sass-loader‘ in…
- Module not found: Error: Can‘t resolve ‘sass-loader‘
- Vue require Error: node_modules/babel-loader/lib
- Vue Cli error: vuecliYou may need an additional loader to handle
- [Solved] redis Error: Can‘t save in background fork Cannot allocate memory
- How to Solve Angular Error: error NG8002: Can‘t bind to ‘ngModel‘ since it isn‘t a known property of ‘input‘.
- [Solved] npm Error: Can‘t find Python executable “python“, you can set the PYTHON env variable.
- [Solved] Vscode Katex Error: ParseError: KaTeX Parse Error: Can‘t Use Function ‘$‘ In Math Mode At Position …
- Sqoop Error: Can‘t parse input data: ‘\N‘ [How to Solve]
- [Solved] Error: Can‘t locate revision identified by ‘xxx‘
- if a proxy or similar is necessary `net.git-fetch-with-cli`, Rust Complete `Couldn‘t resolve host name (Coul
- Anaconda Error: ‘Destination folder’ contains 2 spaces. This can cause problems with several conda packa
- [Solved] Adb Shell Monkey Warning: can‘t create log.txt, Read-only file system
- [Solved] Yolox Run Error: can‘t find starting number
- [Solved] Error dropping database (can‘t rmdir “emos“ errno: 39)
- jupyter notebook Sets Default Browser Error: SyntaxError: (unicode error) ‘utf-8‘ codec can‘t decode byte 0xd4
- [Solved] spark sql Error: Can‘t zip RDDs with unequal numbers of partitions
- [Solved] MYSQLD: Can‘t create directory ‘/usr/local/mysql/data/’(Errcode:2 -No such file or directory)
- Some problems encountered in the initial construction of Ant Design Pro project, such as cross Env, webpack and so on