Skip to content

Remove unused exports-loader - #18

Merged
wataru86 merged 1 commit into
masterfrom
remove-unused-exports-loader
Oct 26, 2026
Merged

wataru86 merged 1 commit into
masterfrom
remove-unused-exports-loader

Conversation

@wataru86

@wataru86 wataru86 commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

What

Removed exports-loader from devDependencies and dropped the loader rule from webpack.config.coffee.

How

  • The webpack build no longer passes .js files through exports-loader.
    • The loader was used without options, so the only output it added to dist/bundle.js was the /*** EXPORTS FROM exports-loader ***/ comment (lines 50 and 688).
  • dist/bundle.js was not regenerated.
  • No lockfile is committed in this repository, so package.json and webpack.config.coffee are the only files changed.

Why

#16 (exports-loader 0.6.4 → 5.0.0) fails at npm i with ERESOLVE, because exports-loader 5 has a peer dependency on webpack ^5 while this repository uses webpack 1.
It cannot be fixed within #16 while the build runs on webpack 1: exports-loader 5 calls this.getOptions(schema), which only exists in the webpack 5 loader API, and requires the exports option.

Merging #17 (webpack 1.15.0 → 5.112.0) first does not help.
It lets #16 pass npm i, but the build runs the webpack that gulp-webpack depends on (>=1.9.0 <2.0.0-0), where this.getOptions does not exist.
CI on #17 is green only because CI does not run the build.

The loader has been a no-op since it was added in 009f80d: exports-loader 0.6 only emits exports for names passed as options, and none were passed.
The dist/bundle.js built in that commit already contained only the comment.
Removing it is a smaller change than upgrading it, whether or not the build moves to webpack 5.

Once this is merged, Dependabot will close #16 because the dependency no longer exists.

Verification

  • Run npm i and npm test.
    • The tests only load dist/parser.js, so they do not cover the webpack build.
  • Load webpack.config.coffee with coffee-script/register and check that only the output setting remains.
  • Not verified: running gulp build and diffing dist/bundle.js, for the reason above. Apart from the unrelated function wrapping noted in Make gulp build work with gulp 5 #14, the expected diff is the removal of the two comment lines and their surrounding blank lines.

Results: #18 (comment)

Refs

🤖 Generated with Claude Code

The webpack entry is src/index.js, which assigns the parser to
window.TagDataParser directly and exports nothing. exports-loader is
used without options, so it only adds an "EXPORTS FROM exports-loader"
comment to dist/bundle.js.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@wataru86 wataru86 self-assigned this Oct 26, 2026
@wataru86

Copy link
Copy Markdown
Member Author

Verification results (on c4e587d, Node.js 24)

  • npm i and npm test: 12 passing.
  • node -e "require('coffee-script/register'); console.log(JSON.stringify(require('./webpack.config')))":
    {"output":{"filename":"./dist/bundle.js"}}
    
  • npm ls exports-loader: (empty)

🤖 This comment was generated with Claude Code

@wataru86
wataru86 marked this pull request as ready for review October 26, 2026 03:06
@wataru86
wataru86 requested a review from a team as a code owner October 26, 2026 03:06
@wataru86
wataru86 requested review from atm-adachi and removed request for a team October 26, 2026 03:06
@wataru86
wataru86 merged commit 7c8cf87 into master Oct 26, 2026
6 checks passed
@P-SiZK
P-SiZK deleted the remove-unused-exports-loader branch October 26, 2026 03:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants