Dependencies are excluded in output when a duplicate function exists
See original GitHub issue- Do you want to request a feature or report a bug? Bug
- What is the current behavior? When a duplicate function exists, dependencies are not included in the resulting zip file.
- If the current behavior is a bug, please provide the steps to reproduce. Create the following two files:
foo.js:
require("./bar");
function foo() {}
function foo() {}
module.exports = foo;
bar.js:
console.log("hello from bar");
Then run netlify build.
- What is the expected behavior?
bar.js should get bundled in the zip file for foo.js, but it doesn’t.
If you remove the duplicate foo function, it gets bundled as expected.
If you run DEBUG=* netlify build, you’ll see this in the output:
precinct could not parse content: Identifier 'foo' has already been declared (4:9)
- Please mention your node.js, and operating system version. Node v12.20.0, MacOS 10.15.7
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Exclude all transitive dependencies of a single dependency
The problem with this approach is that I have to do this for every transitive dependency contributed by sample-artifactB . Is there a...
Read more >How to Resolve a Version Collision of Artifacts in Maven
First, we explored an example of a version collision in a multi-module project. Then, we showed how to exclude transitive dependencies in the ......
Read more >Apache Maven Dependency Plugin – Usage
Dependencies can be included or excluded by a list of types. See unpack-dependencies for details. The artifacts can be unpacked in subfolders ...
Read more >Customizing resolution of a dependency directly
Using module replacement rules · Declare exclusion rule to avoid pulling in google-collections to graph. It is probably the most popular approach. ·...
Read more >Dependencies analysis | IntelliJ IDEA Documentation - JetBrains
Dependencies analysis results shown in the tool window ... Module dependencies analysis shows all modules that exist in the specified scope, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Turns out there’s already an issue for that: https://github.com/dependents/node-precinct/issues/68
Thanks for investigating this @russelldavis! Would you like to create this issue in
node-precinctand link it in the current issue?