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.

Don't include `.dev.js` stuff in the build

See original GitHub issue

image

https://www.runpkg.com/?@web3-ui/core@0.1.0/dist/web3-ui-core.cjs.dev.js

This shouldn’t be published to npm because when process.env.NODE_ENV is not production, the dev.js file is being used.

'use strict';

if (process.env.NODE_ENV === "production") {
  module.exports = require("./web3-ui-core.cjs.prod.js");
} else {
  module.exports = require("./web3-ui-core.cjs.dev.js");
}

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
JoviDeCroockcommented, Dec 13, 2021

You can short-circuit this by changing main in package.json to dist/web3-ui-core.cjs.prod.js then it never enters that file

0reactions
JoviDeCroockcommented, Dec 13, 2021

Got you covered mate! ❤️

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do you prevent install of "devDependencies" NPM ...
The npm install command will install the devDependencies along other dependencies when run inside a package directory, in a development environment (the ...
Read more >
Developing Without a Build (1): Introduction
Tagged with javascript, buildless, webcomponents, importmaps. ... Build tools have really helped push web development forward.
Read more >
Can't find build.js. I have NO IDEA what I'm doing - SitePoint
I used to be able to find JS projects on github and just download them and use them. I'm having problems with a...
Read more >
Do npm dependencies and devDependencies effect your ...
It's clear from the tests above that npm modules installed as dependencies and devDependencies don't matter in terms of your production build, ...
Read more >
How To Build JavaScript Projects Without Getting Stuck
JavaScript Simplified Course: https://javascriptsimplified.comThis is an edited version of the livestream I did yesterday.
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