diff --git a/CHANGELOG.md b/CHANGELOG.md index a770f8014c..7f6b40cda0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,12 @@ Changelog _Note: Gaps between patch versions are faulty, broken or test releases._ +## v3.34.1 (2023-01-31) + +#### :house: Internal + +* Added the ability to specify webpack aliases from the config `build/webpack/alias` + ## v3.34.0 (2023-01-30) #### :boom: Breaking Change diff --git a/build/webpack/CHANGELOG.md b/build/webpack/CHANGELOG.md index 1cde9e7be6..d1360c5e26 100644 --- a/build/webpack/CHANGELOG.md +++ b/build/webpack/CHANGELOG.md @@ -9,6 +9,12 @@ Changelog > - :house: [Internal] > - :nail_care: [Polish] +## v3.34.1 (2023-01-31) + +#### :house: Internal + +* Added the ability to specify webpack aliases from the config + ## v3.34.0 (2023-01-30) #### :boom: Breaking Change diff --git a/build/webpack/alias.js b/build/webpack/alias.js index b5d0876806..51da421f09 100644 --- a/build/webpack/alias.js +++ b/build/webpack/alias.js @@ -13,7 +13,7 @@ const path = require('path'); const - {src} = require('@config/config'), + {src, webpack} = require('@config/config'), {config: pzlr, resolve} = require('@pzlr/build-core'); /** @@ -31,7 +31,9 @@ const aliases = { map[`${el}/sprite`] = path.join(resolve.rootDependencies[i], asset.dir, asset.sprite); return map; - }) + }), + + ...webpack.aliases() }; if (pzlr.designSystem != null) { diff --git a/config/default.js b/config/default.js index 351dbdac8c..3e12ebd789 100644 --- a/config/default.js +++ b/config/default.js @@ -318,6 +318,16 @@ module.exports = config.createConfig({dirs: [__dirname, 'client']}, { * WebPack configuration */ webpack: { + /** + * Returns an object of aliases + * + * @see https://webpack.js.org/configuration/resolve/#resolvealias + * @returns {Object} + */ + aliases() { + return {}; + }, + /** * Returns a value of `mode` *