Git Product home page Git Product logo

webpack_loaders's Introduction

webpack的构建练习 此项目只是一些基础功能: 1,自动清空dist目录内容 clean-webpack-plugin 插件功能 2,自动生成index.html页面 html-webpack-plugin 插件功能 3, source-map生成打包文件后可以快速定位查询bug 4,使用webpack-dev-server插件,可以开启服务,并且修改保存代码后自动在内存中修改打包文件并且更新浏览器

使用方法: 打包文件 => 'npm run build' 开启服务开发环境 => 'npm run dev'

/***********************************************************************************************************************/ 自定义loader的写法: module.exports = function(source){ var str = source + "经过处理的内容!!"; //loader加载进来的文件内容进行下处理 var fn = 'function(){return "'+str+'"}'; //将一个函数以字符串的形式写好 return 'module.exports = ' + fn; //loader模块固定输出方式,都是以字符串形式输出的 }; myloader文件夹就是自定义的loader,使用的时候要把此文件夹放在node_modules里面。

webpack_loaders's People

Contributors

jinux7 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.