Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Images not showing up in Next #60

Open
haveamission opened this issue Jul 27, 2022 · 1 comment
Open

Images not showing up in Next #60

haveamission opened this issue Jul 27, 2022 · 1 comment

Comments

@haveamission
Copy link

Is there a way to get images showing up in Next?

I am trying to use this configuration, after yarn add next-images in my next folder, but it isn't working:

/** @type {import('next').NextConfig} */

const { withNativebase } = require('@native-base/next-adapter')

module.exports = withNativebase({
  dependencies: [
    '@expo/next-adapter',
    'next-images',
    'react-native-vector-icons',
    'react-native-vector-icons-for-web',
    'solito',
    'app',
  ],
  nextConfig: {
    projectRoot: __dirname,
    reactStrictMode: true,
    webpack5: true,
    webpack: (config, options) => {
      config.resolve.alias = {
        ...(config.resolve.alias || {}),
        'react-native$': 'react-native-web',
        '@expo/vector-icons': 'react-native-vector-icons',
      }
      config.resolve.extensions = [
        '.web.js',
        '.web.ts',
        '.web.tsx',
        ...config.resolve.extensions,
      ]
      return config
    },
  },
})
@haveamission
Copy link
Author

Needed to do this:

plugins: [withImages, [withExpo, { projectRoot: __dirname }]], nextConfig: { images: { disableStaticImages: true, }, ... }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant