Setup chunk testing

This commit is contained in:
rswiat 2018-03-15 08:00:19 +00:00
parent 9e753447d3
commit 318b16545c
4 changed files with 110 additions and 8 deletions

View file

@ -1,3 +1,4 @@
// [AIV_SHORT] Version: 0.13.36, Thursday, March 15th, 2018, 7:57:59 AM
/******/ (function(modules) { // webpackBootstrap /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache /******/ // The module cache
/******/ var installedModules = {}; /******/ var installedModules = {};
@ -60,7 +61,7 @@
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/ /******/
/******/ // __webpack_public_path__ /******/ // __webpack_public_path__
/******/ __webpack_require__.p = ""; /******/ __webpack_require__.p = "/";
/******/ /******/
/******/ // Load entry module and return exports /******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 2); /******/ return __webpack_require__(__webpack_require__.s = 2);
@ -87,7 +88,7 @@ test(myVariable);
/* 1 */ /* 1 */
/***/ (function(module, exports) { /***/ (function(module, exports) {
module.exports = "<!DOCTYPE html><html lang=en><head><meta charset=UTF-8><title>Title</title></head><body><span>0.13.36</span> <span>7:54:43</span> <span>0.13.36_7:54:43</span> <span>V:0.13.36 Date:7:54:43</span> <span>Version 0.13.36 , 7:54:43</span></body></html>" module.exports = "<!DOCTYPE html><html lang=en><head><meta charset=UTF-8><title>Title</title></head><body><span>0.13.36</span> <span>7:57:59</span> <span>0.13.36_7:57:59</span> <span>V:0.13.36 Date:7:57:59</span> <span>Version 0.13.36 , 7:57:59</span></body></html>"
/***/ }), /***/ }),
/* 2 */ /* 2 */

100
demo/dist/js/index.js vendored Normal file
View file

@ -0,0 +1,100 @@
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // identity function for calling harmony imports with the correct context
/******/ __webpack_require__.i = function(value) { return value; };
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, {
/******/ configurable: false,
/******/ enumerable: true,
/******/ get: getter
/******/ });
/******/ }
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "/";
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 2);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports, __webpack_require__) {
var html = __webpack_require__(1);
/**
* Sample code
* @type {number}
*/
var myVariable = 5;
var test = function(val) {
return val * val;
};
test(myVariable);
/***/ }),
/* 1 */
/***/ (function(module, exports) {
module.exports = "<!DOCTYPE html><html lang=en><head><meta charset=UTF-8><title>Title</title></head><body><span>0.13.36</span> <span>7:58:33</span> <span>0.13.36_7:58:33</span> <span>V:0.13.36 Date:7:58:33</span> <span>Version 0.13.36 , 7:58:33</span></body></html>"
/***/ }),
/* 2 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(0);
/***/ })
/******/ ]);

View file

@ -13,7 +13,6 @@
"devDependencies": { "devDependencies": {
"html-loader": "^0.4.5", "html-loader": "^0.4.5",
"html-minify-loader": "^1.1.0", "html-minify-loader": "^1.1.0",
"nodemon": "^1.17.2",
"raw-loader": "^0.5.1", "raw-loader": "^0.5.1",
"webpack": "^2.3.3", "webpack": "^2.3.3",
"webpack-auto-inject-version": "^0.5.10" "webpack-auto-inject-version": "^0.5.10"

View file

@ -14,8 +14,10 @@ module.exports = {
extensions: ['.js', '.html'], extensions: ['.js', '.html'],
}, },
output: { output: {
filename: '[name]-bundle.js', filename: 'js/[name].js?[chunkhash]',
path: path.resolve(process.cwd(), 'dist'), path: path.resolve(process.cwd(), 'dist'),
chunkFilename: 'js/[id].js?[chunkhash]',
publicPath: '/', // Public path to 'dist' scope in production
}, },
module: { module: {
loaders: [ loaders: [
@ -42,8 +44,8 @@ module.exports = {
plugins: [ plugins: [
new WebpackAutoInject({ new WebpackAutoInject({
components: { components: {
AutoIncreaseVersion: false, AutoIncreaseVersion: true,
InjectAsComment: false, InjectAsComment: true,
InjectByTag: true, InjectByTag: true,
}, },
componentsOptions: { componentsOptions: {