-
Uncaught SyntaxError: Unexpected token 'export' at /node_modules/ (stripe/firestore-stripe-payments/lib/index.js:16)
Error 原因: 瀏覽器不認得 stripe/firestore-stripe-payments 這個模塊使用的 es6 的 export 語法 -
解決辦法: 安裝 next-transpile-modules 並在 next.config.js 寫入新的配置
// next.config.js const withTM = require("next-transpile-modules")([ "這邊填入要被轉譯的模塊名,以這次的例子就是@stripe/firestore-stripe-payments", ]); // pass the modules you would like to see transpiled module.exports = withTM({});
-
參考: https://stackoverflow.com/questions/65936222/next-js-syntaxerror-unexpected-token-export
forked from andygithub9/netflix-clone-yt
-
Notifications
You must be signed in to change notification settings - Fork 0
andylin9/netflix-clone-yt
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published
Languages
- TypeScript 92.4%
- CSS 5.6%
- JavaScript 2.0%