current position:Home>Pure dry goods - element source code - project initialization and webpack configuration, Java interview with answers

Pure dry goods - element source code - project initialization and webpack configuration, Java interview with answers

2021-08-21 17:22:12 Programmer spark plug

Partial installation webpack

webpack-cli For the latest 4.X edition , webpack-dev-server It doesn't work , You need to specify the version when installing ( Make sure that both module versions are 3.X ).

webpack-cli Provides many commands to webpack It's easier to work with . Official documents

webpack-dev-server It provides you with a simple web server, And have live reloading( Reload in real time ) function . Official documents

install webpack loaders
webpack Use loader Preprocess files . It can be built to include JavaScript Any static resource within .

Official plugin list

webpack Plug in Chinese document

Reference resources

vue-loader Detailed explanation :  https://segmentfault.com/a/1190000020629508

html-webpack-plugin Detailed explanation :  https://www.cnblogs.com/wonyun/p/6030090.html

webpack To configure

stay build Create under directory webpack The configuration file webpack.config.js , Provide entrance (entry) 、 Pattern (Mode) 、 Output (output) 、 modular (Module) 、 plug-in unit (Plugins) 、 Development server (DevServer) Wait for configuration options .

0x02. Project operation
npm scripts To configure

stay npm New in script webpack command , The executed command will automatically go to node_modules seek , No catalog .

modify package.json To configure

.
...
"scripts": { 
    "build:dist": "webpack --config  build/webpack.config.js",
    "dev": "webpack-dev-server --config build/webpack.config.js"
},
...
.

     
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.

cross-env To configure

cross-env Is a script that runs cross platform settings and uses environment variables , Different platforms use unique instructions , Don't worry about cross platform issues .

modify package.json To configure


.
...


#  The end 

Redis** Memory based **, Often used in ** cache ** A technique , also Redis The way to store is to key-value In the form of .Redis In today's Internet technology architecture , The most widely used cache , We often use... In our work .Redis Also in the technical interview of middle and senior back-end engineers , One of the interviewers' favorite questions , So as Java developer ,Redis It's what we have to master .

Redis  yes  NoSQL  A leader in the field of databases , If you need to know  Redis  How to achieve high concurrency 、 Massive data storage , So this Tencent expert is tapping 《Redis Source code log notes 》 It will be your best choice .

![](https://s2.51cto.com/images/20210820/1629422249671809.jpg)

** Interested friends can go through [ give the thumbs-up + Poke here for free ](https://gitee.com/vip204888/java-p7) Written by Tencent experts Redis Source code log notes pdf edition !**
     
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.

copyright notice
author[Programmer spark plug],Please bring the original link to reprint, thank you.
https://en.qdmana.com/2021/08/20210821172208505t.html

Random recommended