Skip to content

Commit 7756258

Browse files
committed
Configure Next.js to import Polaris CSS and the Shopify API key
1 parent a88c4b8 commit 7756258

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

next.config.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
require("dotenv").config();
2+
const withCSS = require('@zeit/next-css');
3+
const webpack = require('webpack');
4+
5+
const apiKey = JSON.stringify(process.env.SHOPIFY_API_KEY);
6+
7+
module.exports = withCSS({
8+
webpack: (config) => {
9+
const env = { API_KEY: apiKey };
10+
config.plugins.push(new webpack.DefinePlugin(env));
11+
return config;
12+
},
13+
});

0 commit comments

Comments
 (0)