react-app-alias-ex
Advanced tools
Comparing version 1.0.0 to 2.0.0
{ | ||
"name": "react-app-alias-ex", | ||
"version": "1.0.0", | ||
"version": "2.0.0", | ||
"description": "Alias for craco or rewire react app", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -8,2 +8,3 @@ const path = require('path') | ||
configPaths, | ||
defaultOptions, | ||
expandResolveAlias, | ||
@@ -99,3 +100,9 @@ expandPluginsScope, | ||
} | ||
const options = {...opts, compilerOptions} | ||
const options = { | ||
...opts, | ||
typescript: { | ||
...opts.typescript, | ||
configOverwrite: compilerOptions, | ||
} | ||
} | ||
plugins[pluginPos] = new Consructor(options) | ||
@@ -105,3 +112,4 @@ } | ||
function aliasJest(aliasMap) { | ||
function aliasJest(options) { | ||
const aliasMap = defaultOptions(options).aliasMap | ||
const aliasJestInstance = aliasJestSafe(aliasMap) | ||
@@ -120,3 +128,4 @@ return function(config) { | ||
function aliasDangerous(aliasMap) { | ||
function aliasWebpack(options) { | ||
const aliasMap = defaultOptions(options).aliasMap | ||
const aliasLocal = Object.keys(aliasMap).reduce( (a,i) => { | ||
@@ -137,3 +146,3 @@ a[i] = path.resolve(paths.appPath, aliasMap[i]) | ||
overrideWebpackConfig: function({webpackConfig, pluginOptions}) { | ||
return aliasDangerous(pluginOptions.alias||configPaths())(webpackConfig) | ||
return aliasWebpack(pluginOptions.alias||configPaths())(webpackConfig) | ||
}, | ||
@@ -146,3 +155,3 @@ overrideJestConfig: function({jestConfig, pluginOptions}) { | ||
module.exports = { | ||
aliasDangerous, | ||
aliasWebpack, | ||
aliasJest, | ||
@@ -149,0 +158,0 @@ configPaths, |
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
5277
144