oklas / react-app-alias

:label: Alias and multiple src directory for craco or rewired create-react-app
MIT License
174 stars 18 forks source link

alias is not defined #64

Closed gonzofish closed 2 years ago

gonzofish commented 2 years ago

When the change was made for v2.0.0 of this library, alias was renamed to aliasWebpack. However the previous alias call was not changed and the library is failing.

EDIT: forgot to attach the error I get:

/Users/gonzofish/Projects/my-project/node_modules/react-app-alias/src/index.js:175
    return alias(pluginOptions.alias||configPaths())(webpackConfig)
    ^

ReferenceError: alias is not defined
    at Object.overrideWebpackConfig (/Users/gonzofish/Projects/my-project/node_modules/react-app-alias/src/index.js:175:5)
    at overrideWebpack (/Users/gonzofish/Projects/my-project/node_modules/@craco/craco/lib/features/plugins.js:42:40)
    at /Users/gonzofish/Projects/my-project/node_modules/@craco/craco/lib/features/plugins.js:64:29
    at Array.forEach (<anonymous>)
    at applyWebpackConfigPlugins (/Users/gonzofish/Projects/my-project/node_modules/@craco/craco/lib/features/plugins.js:63:29)
    at mergeWebpackConfig (/Users/gonzofish/Projects/my-project/node_modules/@craco/craco/lib/features/webpack/merge-webpack-config.js:110:30)
    at overrideWebpackDev (/Users/gonzofish/Projects/my-project/node_modules/@craco/craco/lib/features/webpack/override.js:11:36)
    at /Users/gonzofish/Projects/my-project/node_modules/@craco/craco/scripts/start.js:27:5
oklas commented 2 years ago

:tada: This issue has been resolved in version react-app-alias-v2.0.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: