I was able to solve this problem by using:
<script src="{{ url_for('static', filename='script.js') }}"> </script>