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.

Warning issued in webpack build

See original GitHub issue

When 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:closed
  • Created 7 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
zhouzicommented, Apr 22, 2016

The solution would be to publish a non-bundled, ES5 version along with the npm package so webpack doesn’t bundle it twice.

1reaction
benarmstoncommented, Apr 25, 2016

It’s working for me too. @dleitee thanks for fixing this and for creating a dependency-free string manipulation library.

Read more comments on GitHub >

github_iconTop 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 >

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