前端技术之:常用webpack插件

发布时间:2020-04-03 17:38:15 作者:popgis
来源:网络 阅读:275

1、html-webpack-plugin

Simplifies creation of HTML files to serve your webpack bundles.

主页地址:

https://github.com/jantimon/html-webpack-plugin

安装方法:

npm i --save-dev html-webpack-plugin


2、extract-text-webpack-plugin

Extracts text from a bundle into a separate file.

主页地址:

https://github.com/webpack-contrib/extract-text-webpack-plugin

安装方法:

npm install --save-dev extract-text-webpack-plugin


3、style-loader

Adds CSS to the DOM by injecting a <style> tag.

主页地址:

https://github.com/webpack-contrib/style-loader

安装方法:

npm install style-loader --save-dev


4、css-loader

The css-loader interprets @import and url() like import/require() and will resolve them.

主页地址:

https://github.com/webpack-contrib/css-loader

安装方法:

npm install --save-dev css-loader


5、sass-loader

Loads a Sass/SCSS file and compiles it to CSS.

主页地址:

https://github.com/webpack-contrib/sass-loader

安装方法:

npm install sass-loader node-sass --save-dev


6、url-loader

主页地址:

https://github.com/webpack-contrib/url-loader

安装方法:

npm install url-loader --save-dev


7、file-loader

主页地址:

https://github.com/webpack-contrib/file-loader

安装方法:

npm install file-loader --save-dev

8、html-loader

主页地址:

https://github.com/webpack-contrib/html-loader

安装方法:

npm i -D html-loader

9、image-webpack-loader

Image loader module for webpack. 可用于压缩图片文件.


主页地址:

https://github.com/tcoopman/image-webpack-loader

安装方法:

npm install image-webpack-loader --save-dev


10、babel-loader

This package allows transpiling JavaScript files using Babel and webpack.

主页地址:

https://github.com/babel/babel-loader

安装方法:

webpack 4.x | babel-loader 8.x | babel 7.x

npm install -D babel-loader @babel/core @babel/preset-env webpack

webpack 4.x | babel-loader 7.x | babel 6.x

npm install -D babel-loader@7 babel-core babel-preset-env webpack


11、webpack-dev-server

Serves a webpack app. Updates the browser on changes.

主页地址:

https://github.com/webpack/webpack-dev-server

安装方法:

npm install webpack-dev-server --save-dev


12、vue-loader

vue-loader is a loader for webpack that allows you to author Vue components in a format called Single-File Components (SFCs):

主页地址:

https://github.com/vuejs/vue-loader

安装方法:

npm install vue-loader --save-dev


13、@babel/preset-react

Babel preset for all React plugins.

主页地址:

https://babeljs.io/docs/en/next/babel-preset-react.html

安装方法:

npm install --save-dev @babel/preset-react


14、clean-webpack-plugin

A webpack plugin to remove your build folder(s) before building.

主页地址:

https://github.com/johnagan/clean-webpack-plugin

安装方法:

npm i clean-webpack-plugin --save-dev


15、raw-loader

A loader for webpack that allows importing files as a String.

主页地址:

https://github.com/webpack-contrib/raw-loader

安装方法:

npm install raw-loader --save-dev


16、pug-html-loader

Pug HTML loader for webpack.


主页地址:

https://github.com/willyelm/pug-html-loader

安装方法:

npm install pug-html-loader

依赖于pug和raw-loader 


推荐阅读:
  1. 前端技术之:命令模块及其执行方法
  2. 前端技术之:JavaScript Test 断言库

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

webpack plugins

上一篇:C#委托基础2——多路委托

下一篇:Java14发布有哪些新的内容更新?

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》