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.

Hi Thanks, for very useful library. Any plans to replace require to es6 import? es6 import will be more natural, and since latest versions of chrome and nodejs is supporting them, will work on client and server.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
bennypowerscommented, Feb 26, 2018

Please consider appending the .js extention to import paths, which would allow importing crocks members directly in the browser, sans build-step.

<script type="module">
import Async from '/node_modules/crocks/src/Async/index.js';
</script>

date-fns follows this approach, see for example https://github.com/date-fns/date-fns/blob/master/src/esm/index.js

1reaction
evilsoftcommented, Nov 8, 2017

@gunins Okay. Was talking with someone today and I have a solution to make every one happy. Will have es6 module support in the next release.

Read more comments on GitHub >

github_iconTop Results From Across the Web

import - JavaScript - MDN Web Docs - Mozilla
The static import declaration is used to import read-only live bindings which are exported by another module. The imported bindings are ...
Read more >
ES6 Modules and How to Use Import and Export in JavaScript
The ES2015 (ES6) edition of the JavaScript standard gives us native support for modules with the import and export syntax.
Read more >
16. Modules - Exploring JS
The imports of an ES6 module are read-only views on the exported entities. That means that the connections to variables declared inside module...
Read more >
How to use an ES6 import in Node.js? - GeeksforGeeks
Introduction to ES6 import: The import statement is used to import modules that are exported by some other module. A module is a...
Read more >
A Comprehensive Look at ES6 Modules - JavaScript Tutorial
An ES6 module is a JavaScript file that executes in strict mode only. It means that any variables or functions declared in the...
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