extract-loader
Advanced tools
Comparing version 4.0.3 to 5.0.0
@@ -0,1 +1,13 @@ | ||
# [5.0.0](https://github.com/peerigon/extract-loader/compare/v4.0.3...v5.0.0) (2020-03-05) | ||
### Features | ||
* Add support for ECMAScript modules ([#69](https://github.com/peerigon/extract-loader/issues/69)) ([6034f23](https://github.com/peerigon/extract-loader/commit/6034f23)) | ||
### BREAKING CHANGES | ||
* The extract-loader now uses Babel to transpile the bundle code for the current Node version. This is required in order to support the new file-loader which produces ECMAScript modules. This *should not* be a breaking change but since Babel is also known to be kind of brittle in regards of configuration we cannot guarantee that there might be unknown/unwanted side-effects in your project setup. | ||
## [4.0.3](https://github.com/peerigon/extract-loader/compare/v4.0.2...v4.0.3) (2020-01-29) | ||
@@ -2,0 +14,0 @@ |
@@ -7,2 +7,3 @@ "use strict";Object.defineProperty(exports, "__esModule", { value: true });var _assign = require("babel-runtime/core-js/object/assign");var _assign2 = _interopRequireDefault(_assign);var _promise = require("babel-runtime/core-js/promise");var _promise2 = _interopRequireDefault(_promise);var _map = require("babel-runtime/core-js/map");var _map2 = _interopRequireDefault(_map);var _asyncToGenerator2 = require("babel-runtime/helpers/asyncToGenerator");var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2); | ||
/** | ||
@@ -42,3 +43,3 @@ * @typedef {Object} LoaderContext | ||
} | ||
});return function extractLoader(_x) {return _ref.apply(this, arguments);};})();var _vm = require("vm");var _vm2 = _interopRequireDefault(_vm);var _path = require("path");var _path2 = _interopRequireDefault(_path);var _loaderUtils = require("loader-utils");var _resolve = require("resolve");var _resolve2 = _interopRequireDefault(_resolve);var _btoa = require("btoa");var _btoa2 = _interopRequireDefault(_btoa);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };} | ||
});return function extractLoader(_x) {return _ref.apply(this, arguments);};})();var _vm = require("vm");var _vm2 = _interopRequireDefault(_vm);var _path = require("path");var _path2 = _interopRequireDefault(_path);var _loaderUtils = require("loader-utils");var _resolve = require("resolve");var _resolve2 = _interopRequireDefault(_resolve);var _btoa = require("btoa");var _btoa2 = _interopRequireDefault(_btoa);var _babelCore = require("babel-core");var babel = _interopRequireWildcard(_babelCore);function _interopRequireWildcard(obj) {if (obj && obj.__esModule) {return obj;} else {var newObj = {};if (obj != null) {for (var key in obj) {if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];}}newObj.default = obj;return newObj;}}function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };} | ||
@@ -100,2 +101,15 @@ function evalDependencyGraph({ loaderContext, src, filename, publicPath = "" }) {let evalModule = (() => {var _ref2 = (0, _asyncToGenerator3.default)( | ||
const rndPlaceholderPattern = new RegExp(rndPlaceholder, "g"); | ||
src = babel.transform(src, { | ||
babelrc: false, | ||
presets: [ | ||
[ | ||
"env", { | ||
modules: "commonjs" }]], | ||
plugins: ["add-module-exports"] }). | ||
code; | ||
const script = new _vm2.default.Script(src, { | ||
@@ -102,0 +116,0 @@ filename, |
{ | ||
"name": "extract-loader", | ||
"version": "4.0.3", | ||
"version": "5.0.0", | ||
"description": "webpack loader to extract HTML and CSS from the bundle", | ||
@@ -45,3 +45,3 @@ "main": "lib/extractLoader.js", | ||
"eslint-config-peerigon": "^15.0.2", | ||
"file-loader": "^2.0.0", | ||
"file-loader": "^5.0.2", | ||
"html-loader": "^0.5.5", | ||
@@ -57,2 +57,4 @@ "mocha": "^5.2.0", | ||
"dependencies": { | ||
"babel-core": "^6.26.3", | ||
"babel-plugin-add-module-exports": "^1.0.2", | ||
"babel-runtime": "^6.26.0", | ||
@@ -59,0 +61,0 @@ "btoa": "^1.2.1", |
@@ -76,3 +76,3 @@ extract-loader | ||
You can even add your `index.html` as `entry` and just reference your stylesheets from there. You just need to tell the html-loader to also pick up `link:href`: | ||
You can even add your `index.html` as `entry` and reference your stylesheets from there. In that case, tell the html-loader to also pick up `link:href`: | ||
@@ -257,3 +257,3 @@ ```js | ||
From opening a bug report to creating a pull request: **every contribution is appreciated and welcome**. If you're planing to implement a new feature or change the api please create an issue first. This way we can ensure that your precious work is not in vain. | ||
From opening a bug report to creating a pull request: **every contribution is appreciated and welcome**. If you're planning to implement a new feature or change the api please create an issue first. This way we can ensure that your precious work is not in vain. | ||
@@ -260,0 +260,0 @@ All pull requests should have 100% test coverage (with notable exceptions) and need to pass all tests. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
32953
138
6
+ Addedbabel-core@^6.26.3
+ Addedansi-regex@2.1.1(transitive)
+ Addedansi-styles@2.2.1(transitive)
+ Addedbabel-code-frame@6.26.0(transitive)
+ Addedbabel-core@6.26.3(transitive)
+ Addedbabel-generator@6.26.1(transitive)
+ Addedbabel-helpers@6.24.1(transitive)
+ Addedbabel-messages@6.23.0(transitive)
+ Addedbabel-plugin-add-module-exports@1.0.4(transitive)
+ Addedbabel-register@6.26.0(transitive)
+ Addedbabel-template@6.26.0(transitive)
+ Addedbabel-traverse@6.26.0(transitive)
+ Addedbabel-types@6.26.0(transitive)
+ Addedbabylon@6.18.0(transitive)
+ Addedbalanced-match@1.0.2(transitive)
+ Addedbrace-expansion@1.1.11(transitive)
+ Addedchalk@1.1.3(transitive)
+ Addedconcat-map@0.0.1(transitive)
+ Addedconvert-source-map@1.9.0(transitive)
+ Addeddebug@2.6.9(transitive)
+ Addeddetect-indent@4.0.0(transitive)
+ Addedescape-string-regexp@1.0.5(transitive)
+ Addedesutils@2.0.3(transitive)
+ Addedglobals@9.18.0(transitive)
+ Addedhas-ansi@2.0.0(transitive)
+ Addedhome-or-tmp@2.0.0(transitive)
+ Addedinvariant@2.2.4(transitive)
+ Addedis-finite@1.1.0(transitive)
+ Addedjs-tokens@3.0.2(transitive)
+ Addedjsesc@1.3.0(transitive)
+ Addedjson5@0.5.1(transitive)
+ Addedlodash@4.17.21(transitive)
+ Addedloose-envify@1.4.0(transitive)
+ Addedminimatch@3.1.2(transitive)
+ Addedmkdirp@0.5.6(transitive)
+ Addedms@2.0.0(transitive)
+ Addedos-homedir@1.0.2(transitive)
+ Addedos-tmpdir@1.0.2(transitive)
+ Addedpath-is-absolute@1.0.1(transitive)
+ Addedprivate@0.1.8(transitive)
+ Addedrepeating@2.0.1(transitive)
+ Addedslash@1.0.0(transitive)
+ Addedsource-map@0.5.7(transitive)
+ Addedsource-map-support@0.4.18(transitive)
+ Addedstrip-ansi@3.0.1(transitive)
+ Addedsupports-color@2.0.0(transitive)
+ Addedto-fast-properties@1.0.3(transitive)
+ Addedtrim-right@1.0.1(transitive)