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.

This is an ES6 module, meaning that you can’t just import it in Node and start using it. You have to transpile or use babel-core/register prior to attempting to import it. Since this is a general-purpose library, I think the right approach is to switch to CommonJS module format, which AFAIK, is supported natively by Node, browserify, webpack, and JSPM, which I think covers all of the most common package managers in use today.

Todo:

  • 1. package.json needs to point to source/dsm.js
  • 2. Swap out import/export with require/module.exports. (example).
  • 3. No build step needed! Compiling for the intended targets is a job for the module users, not for us. We don’t know the intended targets, so we don’t know the right options to build for. If we give them the raw source, it gives users the flexibility and freedom they need to decide things like whether or not they need to bundle a generator runtime, etc…

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
ericelliottcommented, Sep 30, 2016

published

1reaction
ericelliottcommented, Oct 2, 2016

Hmm… I pulled in Babel just for the import support. Since we’re using Node 6 for the build, and we’ve switched to CommonJS modules, @Sigmus may be right. I’ve created a new issue to address the removal.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Welcome to Python Fix Imports's documentation
Python Fix Imports is a Python module that can automatically reorganize the import statements of your Python script. Please read the “Rationale” section...
Read more >
Python Fix Imports - Package Control
Python Fix Imports is a Sublime Text 3 plugin that can automatically reorganize the import statements of your Python script. Please read the...
Read more >
fiximports - PyPI
Python Fix Imports is a Python executable that can automatically reorganize the import statements of your Python script, by splitting single import ...
Read more >
Automatically "fix imports" in XCode 9? - Apple Developer
With 300 new "automatic fixes" in the XCode 9 editor, i'm puzzled why there is still no "fix imports" function, like in most...
Read more >
fiximports (Fix Target Module Imports) - Windows drivers
.fiximports (Fix Target Module Imports). Article; 12/14/2021; 2 minutes to read; 1 contributor. Feedback ...
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