Giter VIP home page Giter VIP logo

minimal-shadow-cljs-webpack's Introduction

ClojureScript HMR with Webpack based on shadow-cljs

It's also possible to do HMR with shadow-cljs alone, but using Webpack for more features.

Guide

  • Development
yarn
yarn shadow-cljs watch app

# use another terminal
yarn dev # start webpack-dev-server

# use another terminal
open http://localhost:8080

Edit src/app/lib.cljs to see hot replacing.

  • Build
yarn build

Find built assets in dist/.

In real-world projects, you may need to config externs to make :advanced mode work.

License

MIT

minimal-shadow-cljs-webpack's People

Contributors

chenyong avatar dependabot[bot] avatar soyaine avatar thheller avatar tiye avatar tmono avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

minimal-shadow-cljs-webpack's Issues

Repl doesn't work properly

A lot of thanks for this example! It helps a lot.

There was only one problem with shadow-cljs.edn - :entries line is missing, but from the error message it's easy enough to understand what's going wrong and fix it.

I'd like to ask for help with another issue: I add required dependencies for repl:

                [nrepl "0.6.0"]
                [cider/cider-nrepl "0.25.0-alpha1"]

After that I can connect to the repl and even can evaluate some expressions. But for anything more complex than (+ 1 2) or (js/console.log "hello world"), there is an error in browser console:

failed to parse websocket message {:type :repl/invoke, :name "<eval>", :js "cider.nrepl.....a lot of text here......", :warnings [], :id 10} ReferenceError: CLOSURE_BASE_PATH is not defined

Is it a problem in interaction between webpack and shadow-cljs?

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.