I am looking to set up a page that redirects to the stripe payment page using stripe-samples/firebase-subscription-payments. I have placed its html/css/js files (found in the "public" folder) in my nuxt app's /static directory. However, since this is for static files only, I cannot utilize vuex and plugins. Luckily, the script tag in html can fetch firebase from the URL, allowing me to incorporate firebase.
Is it possible to directly add raw html/css/js files to nuxt/pages like .vue files? I attempted this but faced challenges. While the ideal solution would be to convert the html/js file into a vue file, as a beginner it proved to be too complex for me. Additionally, English is not my native language, so apologies for any errors. Can npm packages and modules be used in /static files? I have spent two days researching this without finding a solution. Any assistance would be greatly appreciated, thank you!
Here is an excerpt of my code: static/public/javascript/app.js
import firebase from firebase;
/*↑ it will be error "Cannot use import statement outside a module".
In pages/.vue files and plugins/files, however, it works.
I also attempted "import firebase from '~/plugins/firebase.js'";*/
const STRIPE_PUBLISHABLE_KEY = ....
static/public/index.html
<!-- Firebase App (the core Firebase SDK) is always required and must be listed first -->
<script src="https://www.gstatic.com/firebasejs/7.14.6/firebase.js"></script>
<script src="https://www.gstatic.com/firebasejs/7.14.6/firebase-functions.js"></script>
<!-- If you enabled Analytics in your project, add the Firebase SDK for Analytics -->
<script src="https://www.gstatic.com/firebasejs/7.14.5/firebase-analytics.js"></script>
<!-- Add Firebase products that you want to use -->
<script src="https://www.gstatic.com/firebasejs/7.14.5/firebase-auth.js"></script>
<script src="https://www.gstatic.com/firebasejs/7.14.5/firebase-firestore.js"></script>
↑ It fetches firebase from the URL, but I desire to employ the firebase module that I have installed.