Coder Social home page Coder Social logo

webpack_plugin_makeheadcdn's Introduction

webpack_plugin_makeheadcdn

webpack插 用于生成资源头部节点与CDN时间戳的

安装

npm i webpack_plugin_makeheadcdn --save-dev

使用 (webpack.config.js)

var webpack_fed_build = require('webpack_plugin_makeheadcdn');

var config = {
	... //省略
	plugins: [
		new webpack_fed_build({
			time:timechuo,
			author:'chenwp@chenwp'
		})
	]
};

module.exports = config;

源代码

var datax = 'http://www.baidu.com/b.js?v=__time__';
var data = '/open.js?t=__time__';
_loadJS('/dist/fed.v2.0.js?v=__md5__');
_loadJS('/dist/task.v2.0.js?v=__md5__');

转化后代码

/*! 2016-04-08T09:38:00.791Z _^0^_ [email protected] */

var datax = 'http://www.baidu.com/b.js?v=2016-04-08T09:38:01.342Z';
var data = '/open.js?t=2016-04-08T09:38:01.342Z';

_loadJS('/dist/fed.v2.0.js?v=59c4b3981a8af7fc5751f935c8911340');
_loadJS('/dist/task.v2.0.js?v=5f19626307f66ffea4fbce66c392a965');

webpack_plugin_makeheadcdn's People

Stargazers

 avatar

Watchers

 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.