Warning issued in webpack build
See original GitHub issueWhen including strman in an ES6 module built with webpack I’m presented with the following warning.
WARNING in ./~/strman/dist/strman.js
Critical dependencies:
1:404-411 This seems to be a pre-built javascript file. Though this is possible, it's not recommended. Try to require the original source to get better results.
@ ./~/strman/dist/strman.js 1:404-411
The module that imports it does so with
import {toCamelCase} from 'strman';
It would be very good if you could provide a build which didn’t produce that warning.
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Browser build causes webpack warning by using require ...
Environments: Prettier Version: 1.18.2 Running Prettier via: Browser API Runtime: Node.js 12.11.1 (via webpack) Operating System: macOS ...
Read more >Webpack warning in ReactJs - Stack Overflow
When you type "npm starts" in command line, webpack runs your code as "development" mode which means webpack doesn't optimize your code and ......
Read more >Stats - webpack
Tells stats whether to group modules by their attributes (errors, warnings, assets, optional, orphan, or dependent). module.exports = { //... stats: { ...
Read more >How I solved and debugged my Webpack issue through trial ...
When webpack bundles your source code, it can become difficult to track down errors and warnings to their original location.
Read more >warnings-to-errors-webpack-plugin - npm
Change every warning as error to ensure safe build. Latest version: 2.3.0, last published: a year ago.
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
The solution would be to publish a non-bundled, ES5 version along with the npm package so webpack doesn’t bundle it twice.
It’s working for me too. @dleitee thanks for fixing this and for creating a dependency-free string manipulation library.