Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
chore: @types/tapable to devDeps (#1076)
- types packages should not be installed for plugin users
- adjusted bundles to current webpack@4 behavior
  • Loading branch information
AviVahl authored and jantimon committed Oct 15, 2018
1 parent 3934cff commit 7fb656a
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 15 deletions.
4 changes: 3 additions & 1 deletion examples/default/dist/webpack-4/bundle.js
Expand Up @@ -473,7 +473,9 @@ function addStyle (obj, options) {

// If a transform function was defined, run it on the css
if (options.transform && obj.css) {
result = options.transform(obj.css);
result = typeof options.transform === 'function'
? options.transform(obj.css)
: options.transform.default(obj.css);

if (result) {
// If transform returns a value, use that instead of the original css.
Expand Down
5 changes: 2 additions & 3 deletions examples/javascript-advanced/dist/webpack-4/bundle.js
Expand Up @@ -88,7 +88,7 @@
/* 0 */
/***/ (function(module, exports, __webpack_require__) {

eval("__webpack_require__(1);\n\nvar universal = __webpack_require__(3);\nvar h1 = document.createElement('h1');\nh1.innerHTML = universal();\n\ndocument.body.appendChild(h1);\n\n\n//# sourceURL=webpack:///./example.js?");
eval("__webpack_require__(1);\n\nvar universal = __webpack_require__(2);\nvar h1 = document.createElement('h1');\nh1.innerHTML = universal();\n\ndocument.body.appendChild(h1);\n\n\n//# sourceURL=webpack:///./example.js?");

/***/ }),
/* 1 */
Expand All @@ -97,8 +97,7 @@ eval("__webpack_require__(1);\n\nvar universal = __webpack_require__(3);\nvar h1
eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./main.css?");

/***/ }),
/* 2 */,
/* 3 */
/* 2 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
Expand Down
5 changes: 2 additions & 3 deletions examples/javascript/dist/webpack-4/bundle.js
Expand Up @@ -88,7 +88,7 @@
/* 0 */
/***/ (function(module, exports, __webpack_require__) {

eval("__webpack_require__(1);\n\nvar universal = __webpack_require__(3);\nvar h1 = document.createElement('h1');\nh1.innerHTML = universal();\n\ndocument.body.appendChild(h1);\n\n\n//# sourceURL=webpack:///./example.js?");
eval("__webpack_require__(1);\n\nvar universal = __webpack_require__(2);\nvar h1 = document.createElement('h1');\nh1.innerHTML = universal();\n\ndocument.body.appendChild(h1);\n\n\n//# sourceURL=webpack:///./example.js?");

/***/ }),
/* 1 */
Expand All @@ -97,8 +97,7 @@ eval("__webpack_require__(1);\n\nvar universal = __webpack_require__(3);\nvar h1
eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./main.css?");

/***/ }),
/* 2 */,
/* 3 */
/* 2 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
Expand Down
13 changes: 6 additions & 7 deletions examples/pug-loader/dist/webpack-4/bundle.js
Expand Up @@ -92,7 +92,7 @@

__webpack_require__(1);
// Use the same template for the frontend code
var template = __webpack_require__(3);
var template = __webpack_require__(2);

setInterval(function () {
var div = document.getElementById('main');
Expand All @@ -108,17 +108,16 @@ setInterval(function () {
// extracted by mini-css-extract-plugin

/***/ }),
/* 2 */,
/* 3 */
/* 2 */
/***/ (function(module, exports, __webpack_require__) {

var pug = __webpack_require__(4);
var pug = __webpack_require__(3);

function template(locals) {var pug_html = "", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (time) {pug_html = pug_html + "\u003C!-- this partial is used for frontend and backend--\u003E\u003Cdiv class=\"time\"\u003E \u003Cb\u003ECurrent time\u003C\u002Fb\u003E\u003Cp\u003E" + (pug.escape(null == (pug_interp = time.toISOString()) ? "" : pug_interp)) + "\u003C\u002Fp\u003E\u003C\u002Fdiv\u003E\u003Cimg src=\"#{require('.\u002Flogo.png')}\"\u003E";}.call(this,"time" in locals_for_with?locals_for_with.time:typeof time!=="undefined"?time:undefined));;return pug_html;};
module.exports = template;

/***/ }),
/* 4 */
/* 3 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
Expand Down Expand Up @@ -351,7 +350,7 @@ function pug_rethrow(err, filename, lineno, str){
throw err;
}
try {
str = str || __webpack_require__(5).readFileSync(filename, 'utf8')
str = str || __webpack_require__(4).readFileSync(filename, 'utf8')
} catch (ex) {
pug_rethrow(err, null, lineno)
}
Expand All @@ -378,7 +377,7 @@ function pug_rethrow(err, filename, lineno, str){


/***/ }),
/* 5 */
/* 4 */
/***/ (function(module, exports) {

/* (ignored) */
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -28,6 +28,7 @@
"devDependencies": {
"@types/loader-utils": "1.1.3",
"@types/node": "10.11.4",
"@types/tapable": "1.0.4",
"appcache-webpack-plugin": "^1.4.0",
"commitizen": "3.0.2",
"css-loader": "^1.0.0",
Expand All @@ -48,7 +49,6 @@
"webpack-recompilation-simulator": "^3.0.0"
},
"dependencies": {
"@types/tapable": "1.0.4",
"html-minifier": "^3.5.20",
"loader-utils": "^1.1.0",
"lodash": "^4.17.11",
Expand Down

0 comments on commit 7fb656a

Please sign in to comment.