question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

asset/resource builds outside of dist when [pathname] contains references to hoisted node_modules

See original GitHub issue

Bug report

What is the current behavior?

Files located in hoisted node_modules of a workspace and loaded as asset/resource are built outside of dist. This differs from what file-loader does

If the current behavior is a bug, please provide the steps to reproduce.

https://github.com/dreyks/asset-resource-bug

What is the expected behavior?

All built files should end up inside the dist folder no matter where they are located on the fs

Other relevant information: webpack version: webpack@5.56.0 Node.js version: v14.13.1 Operating System: MacOS Additional tools:

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:22 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
alexander-akaitcommented, Nov 27, 2022

@glen-84 Yeah, we should do it, sometimes developers are lazy 😄

1reaction
alexander-akaitcommented, Oct 4, 2021

yes, there are some breaking changes between asset modules and file-loader

Read more comments on GitHub >

github_iconTop Results From Across the Web

Webpack can't resolve asset/resource? - Stack Overflow
So it looks like webpack doesn't find it's own built in package ? The doc s quite clear about t being built in...
Read more >
How to transpile ES modules with webpack and Node.js
Learn how webpack interacts with and supports ES modules in this deep dive tutorial on transpilation in Node.js.
Read more >
API - ESBuild
#Build API. The build API call operates on one or more files in the file system. This allows the files to reference each...
Read more >
CopyWebpackPlugin | webpack
Copies individual files or entire directories, which already exist, to the build directory. Getting Started. To begin, you'll need to install copy-webpack- ...
Read more >
Dependency resolution - Parcel
As Parcel builds your source code, it discovers dependencies, ... Parcel includes shims for many builtin Node.js modules, e.g. path and url ....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found