Skip to content
This repository was archived by the owner on Jul 25, 2025. It is now read-only.

fix webpack config interpreting cjs files as assets#111

Merged
aruniverse merged 1 commit into
imodeljsfrom
fix/webpack-resource-exclude-cjs
Nov 16, 2023
Merged

fix webpack config interpreting cjs files as assets#111
aruniverse merged 1 commit into
imodeljsfrom
fix/webpack-resource-exclude-cjs

Conversation

@jason-crow
Copy link
Copy Markdown

@jason-crow jason-crow commented Nov 16, 2023

  • the current webpack.config.js would interpret .cjs files as assets preventing them from being loaded as source
  • solution was to amend the rule for asset/resource to exclude .cjs files
  • this issue came up because in the newer axios versions are configured to pull the source as .cjs for requires from a browser
  • see 🚑 webpack - loading cjs as an asset instead of source

Copy link
Copy Markdown
Member

@aruniverse aruniverse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stupid axios

@aruniverse aruniverse merged commit a70eff9 into imodeljs Nov 16, 2023
@aruniverse aruniverse deleted the fix/webpack-resource-exclude-cjs branch November 16, 2023 15:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants