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.

Easier npm import

See original GitHub issue

Normally, at least in VS Code, I can import something by clicking ctrl + .

This does not work with reduce-reducers. Instead I have to manually write

import * as reduceReducers from 'reduce-reducers';

If possible, make it so clicking ctrl + . on reduceReducers() automatically adds the import

import { reduceReducers } from 'reduce-reducers';

Thanks for this great utility function 😃

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:19 (8 by maintainers)

github_iconTop GitHub Comments

3reactions
timchecommented, May 1, 2018

I’ve published version 0.3.0 which includes an ES build now. Hope this also fixes your issue @MartinJHammer

2reactions
timchecommented, May 3, 2018

We are using export default, so it needs to be imported as default. There is no named export, so import { foo } doesn’t work at all.

If you are not too familiar with it, it’s nicely explained here: https://stackoverflow.com/questions/36795819/when-should-i-use-curly-braces-for-es6-import/36796281#36796281

Read more comments on GitHub >

github_iconTop Results From Across the Web

easy-import - npm
An easy way to include modules in your JavaScript code. ... Start using easy-import in your project by running `npm i easy-import`.
Read more >
Import & Use NPM Modules in The Browser Easily - Medium
Prerequisite Steps: · Step 1. Node & NPM Installation: Official Downloads Page · Step 2. Create a folder for your workspace and inside...
Read more >
How to use NPM (and import/export modules) in JavaScript
How to use NPM (and import/export modules) in JavaScript. By Rajat Verma on June 13th ... It makes it easier to install and...
Read more >
Making it Easier to Work With Local npm Packages
Using this pattern can also be useful for doing samples within a repo as the sample can refer to the package by name...
Read more >
Simple import statements for npm package - Stack Overflow
then add the deployed library to the package.json of the consumer as dependency and install it with npm install . With this step,...
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