forked from kinngh/shopify-nextjs-prisma-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.js
31 lines (27 loc) · 889 Bytes
/
next.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*
Security note: Don't expose any secret env values here.
*/
const webpack = require("webpack");
const apiKey = JSON.stringify(process.env.SHOPIFY_API_KEY);
const appUrl = JSON.stringify(process.env.SHOPIFY_APP_URL);
module.exports = {
swcMinify: true, //Use Rust compiler (beta)
webpack: (config) => {
const env = { API_KEY: apiKey, appOrigin: appUrl };
config.plugins.push(new webpack.DefinePlugin(env));
//MARK:- ESM support for .mjs
// config.module.rules.push({
// test: /\.mjs$/,
// include: /node_modules/,
// type: "javascript/auto",
// });
return config;
},
/*
experimental: {
concurrentFeatures: true, //server side streaming
serverComponents: true, //React server side components
urlImports: ["https://cdn.whitelisted-url.com/"] //To use URL imports, domain must first be whitelisted
},
*/
};