Coder Social home page Coder Social logo

freshheads-javascript-essentials's People

Contributors

martinbroos avatar rensio avatar rogierzeebregts avatar rutgerfh avatar stijnfreshheads avatar yannickfh avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

freshheads-javascript-essentials's Issues

ESNext build kan niet worden gebruikt met Next.js serverside

Error: SyntaxError: Cannot use import statement outside a module

Geimporteerde modules in Next dienen ofwel commonJS te zijn of een ES module maar dan moet er wel in de package.json "type": "module" staan. Anders wordt dit niet als ES module opgepikt.

Na een snelle test werkt dit wel maar vervolgens heb je problemen in andere projecten die dan tijdens builden deze error geven:

Module not found: Error: Can't resolve './browserStorage' in '/Users/martin/projects/freshheads-javascript-essentials/build/storage'
Did you mean 'browserStorage.js'?
BREAKING CHANGE: The request './browserStorage' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.`

Wellicht is het meest handig om meerdere builds te maken UMD, ES en CommonJS bv. Maar dat gaat niet met alleen Typescript wat we hier gebruiken dus dan zouden we bv naar RollUp moeten kijken. Maar wie weet is er ook wel een andere oplossing aan de kant van Next.JS.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.