From 1e456917e2b06ecf093e0fd14f8de40e7c77a237 Mon Sep 17 00:00:00 2001 From: Irina Kuzmina Date: Wed, 13 Nov 2024 17:14:09 +0300 Subject: [PATCH] Fix relative path (#6) --- webpack.config.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index 0febbe2..ff460c3 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,5 +1,7 @@ const path = require('path'); +const entries = ['d3-chord/v3.0.1', 'd3/v7.9.0']; + module.exports = { entry: { '@gravity-ui/date-utils/v2.3.0': { @@ -8,8 +10,10 @@ module.exports = { '@gravity-ui/date-utils/v2.5.3': { import: '@gravity-ui/date-utils.2.5.3', }, - 'd3-chord/v3.0.1': './src/entries/d3-chord_v3.0.1.ts', - 'd3/v7.9.0': './src/entries/d3_v7.9.0.ts', + ...entries.reduce((acc, entry) => { + acc[entry] = path.resolve(__dirname, `src/entries/${entry.replace('/', '_')}.ts`); + return acc; + }, {}), }, mode: 'production', output: {