@fluentui/react-icons-atomic-webpack-loader 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/transform.js +5 -0
- package/package.json +2 -2
package/lib/transform.js
CHANGED
|
@@ -57,6 +57,11 @@ function transformSource(source, options) {
|
|
|
57
57
|
const relevantEntries = exp.entries.filter((e) => e.moduleRequest?.value === MODULE_NAME && e.exportName.kind === 'Name');
|
|
58
58
|
if (relevantEntries.length === 0)
|
|
59
59
|
continue;
|
|
60
|
+
// Skip indirect re-exports (`import { X } from '...'; export { X };`): oxc reports these as static
|
|
61
|
+
// exports anchored at the originating `import` statement. The import loop above has already
|
|
62
|
+
// rewritten that range, so emitting again here would produce duplicate declarations.
|
|
63
|
+
if (source.startsWith('import', exp.start))
|
|
64
|
+
continue;
|
|
60
65
|
const lines = [];
|
|
61
66
|
for (const entry of relevantEntries) {
|
|
62
67
|
const importedName = entry.importName.name;
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-icons-atomic-webpack-loader",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"description": "Webpack loader that transforms barrel imports and re-exports from @fluentui/react-icons into atomic deep paths",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "tsc -p .",
|
|
8
|
-
"test": "webpack -c test/webpack.config.js"
|
|
8
|
+
"test": "vitest run && webpack -c test/webpack.config.js"
|
|
9
9
|
},
|
|
10
10
|
"engines": {
|
|
11
11
|
"node": ">=20.0.0"
|