How to build a separate js file out side of main app bundle? #15969
-
I am using Firebase Messaging which requires service workers as a separate JS file https://github.com/firebase/quickstart-js/blob/master/messaging/firebase-messaging-sw.js In a next js project , how could I create a script that is not in the main bundle? (still need webpack to bundle required packages) |
Beta Was this translation helpful? Give feedback.
Answered by
jamesmosier
Aug 7, 2020
Replies: 1 comment
-
next-offline might be a good resource to look towards for doing something similar.. It will require adding some custom webpack configurations to your next-offline augments the webpack entires as seen here |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
guoyunhe
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
next-offline might be a good resource to look towards for doing something similar.. It will require adding some custom webpack configurations to your
next.config.js
next-offline augments the webpack entires as seen here