bower.json takes precedence over package.json when using DirectoryDescriptionFilePlugin
See original GitHub issueSome of my modules installed from npm also define a bower.json file. When using the following plugin, the main
field from their bower.json
will be used to resolve them, when I’d expect webpack to use package.json
.
new webpack.ResolverPlugin(
new webpack.ResolverPlugin.DirectoryDescriptionFilePlugin('bower.json', ['main'])
)
Issue Analytics
- State:
- Created 8 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
How Yarn manages package.json and bower.json files, when ...
In my project's root folder,both bower.json and package.json are present. When using npm previosly,i do both npm and bower install seperately.
Read more >Project Config with vercel.json
The framework property can be used to override the Framework Preset in the Project Settings dashboard. The value must be a valid framework...
Read more >How to use webpack with Rails - clarkdave.net
Installing webpack & Bower. Installing webpack. Because webpack is a node.js application, we'll need a package.json file in our Rails root.
Read more >bower | Yarn - Package Manager
Bower - A package manager for the web. Build Backers on Open Collective Sponsors on Open Collective ..psst! While Bower is maintained, we...
Read more >bower.json and .bowerrc missing from VS templates...
When the process was ok, it creates a file with json inside and also ... or where's a guide on how to install...
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
I tried what @fenivana suggests, but it isn’t working for me. It is now using package.json in bower_components. What I actually need is:
bower_components -> use bower.json only node_modules -> use package.json only
@fenivana Nice. I would add for the
browser
property as there are some NPM packages that usemain
for server-side andbrowser
for client-side.