Javascript module not working in browser?

前端 未结 8 1858
半阙折子戏
半阙折子戏 2020-12-10 11:35

Alright, I have looked on this site and have found several different answers, none of which have worked for me. Basically had a js file that had many functions in it along

8条回答
  •  温柔的废话
    2020-12-10 12:31

    function show_message(){
        alert("Hello");
    }
    
    export { show_message };
    

    and

    import { show_message } from './functions'
    

    i think this should do the trick. this is a named export/import technique. you can under this name find more information if you desire it.

提交回复
热议问题