Dab tsi yog Devtool hauv Webpack?
Dab tsi yog Devtool hauv Webpack?

Video: Dab tsi yog Devtool hauv Webpack?

Video: Dab tsi yog Devtool hauv Webpack?
Video: Hmong new song 2016 - Yog dab tsi - Xub Hluav Taws (Official MV) 2024, Kaum ib hlis
Anonim

Devtool . Qhov kev xaiv no tswj tau yog tias thiab yuav ua li cas cov ntawv qhia chaw tsim tawm. Siv SourceMapDevToolPlugin rau kev teeb tsa zoo dua. Saib lub hauv paus-map-loader los cuam tshuam nrog cov ntawv qhia chaw uas twb muaj lawm.

Raws li, Sourcemap yog dab tsi hauv Webpack?

Hauv kev nkag siab, cov ntawv qhia chaw yog lub nplhaib decoder rau koj cov lej zais (tso tseg). Siv Webpack , qhia devtool: "source-map" hauv koj Webpack config yuav pab tau qhov chaw maps, thiab Webpack yuav tso tawm qhov sourceMappingURL cov lus qhia hauv koj qhov kawg, cov ntaub ntawv minified.

Tom qab ntawd, lo lus nug yog, Webpack kev sib koom ua ke yog dab tsi? webpack - ua ke muab ib ua ke muaj nuj nqi uas concatenates arrays thiab merges khoom tsim ib yam khoom tshiab. Thaum twg koj xav tau ua ke configuration khoom, webpack - ua ke tuaj yeem ua ke. Tseem muaj ib webpack tshwj xeeb ua ke variant hu ua ua ke.

Hais txog qhov no, Webpack siv rau dab tsi?

Webpack yog ib qho zoo li qub module bundler rau cov ntawv thov JavaScript - nws yuav siv tag nrho cov cai los ntawm koj daim ntawv thov thiab ua rau nws siv tau hauv web browser. Modules yog reusable chunks ntawm code tsim los ntawm koj app's JavaScript, node_modules, dluab, thiab CSS styles uas tau ntim tau yooj yim. siv hauv koj lub vev xaib.

Sourcemaps ua haujlwm li cas?

Yuav ua li cas Qhov Chaw Ua Haujlwm Maps . Raws li lub npe qhia, daim ntawv qhia qhov chaw muaj tag nrho cov ntaub ntawv uas tuaj yeem siv los qhia cov cai hauv cov ntaub ntawv compressed rov qab mus rau nws qhov qub. Koj tuaj yeem hais qhia ib daim ntawv qhia sib txawv rau txhua yam ntawm koj cov ntaub ntawv compressed.

Pom zoo: