corejs-upgrade-webpack-plugin
Advanced tools
Comparing version 2.0.0 to 2.1.0
@@ -48,4 +48,4 @@ "use strict"; | ||
if (/core-js\/library\/fn\/(.*)/.test(originalRequest)) { | ||
const [, matchedPath] = originalRequest.match(/core-js\/library\/fn\/(.*)/); | ||
if (/core-js(?:\/library)?\/fn\/(.*)/.test(originalRequest)) { | ||
const [, matchedPath] = originalRequest.match(/core-js(?:\/library)?\/fn\/(.*)/); | ||
const path = rewriteRenamedModules(matchedPath); | ||
@@ -52,0 +52,0 @@ return rewriteAndPreservePrefix(originalRequest, `features/${path}`, 'core-js-pure'); |
{ | ||
"name": "corejs-upgrade-webpack-plugin", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "a webpack plugin that transforms core-js v2 paths to core-js v3 paths", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -43,3 +43,3 @@ import CoreJsAutoUpgradePlugin, { rewriteCoreJsRequest } from './index'; | ||
describe('rewrite `core-js/library/fn/*`', () => { | ||
describe('rewrite `core-js/library/fn/*` and `core-js/fn/*`', () => { | ||
it('should rewrite `core-js/library/*` import to `core-js-pure/features/*`', () => { | ||
@@ -50,2 +50,8 @@ expect(rewriteCoreJsRequest('core-js/library/fn/object/assign')).toBe( | ||
}); | ||
it('should rewrite `core-js/fn/*` import to `core-js-pure/features/*`', () => { | ||
expect(rewriteCoreJsRequest('core-js/fn/object/assign')).toBe( | ||
'core-js-pure/features/object/assign' | ||
); | ||
}); | ||
}); | ||
@@ -52,0 +58,0 @@ |
@@ -37,4 +37,4 @@ import { NormalModuleReplacementPlugin } from 'webpack'; | ||
if (/core-js\/library\/fn\/(.*)/.test(originalRequest)) { | ||
const [,matchedPath] = originalRequest.match(/core-js\/library\/fn\/(.*)/); | ||
if (/core-js(?:\/library)?\/fn\/(.*)/.test(originalRequest)) { | ||
const [,matchedPath] = originalRequest.match(/core-js(?:\/library)?\/fn\/(.*)/); | ||
@@ -41,0 +41,0 @@ const path = rewriteRenamedModules(matchedPath); |
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
14801
7
299