Coder Social home page Coder Social logo

aaronlifton / react-simple-image-zoom Goto Github PK

View Code? Open in Web Editor NEW
14.0 1.0 3.0 2.98 MB

Simple image zoom component for react

License: MIT License

TypeScript 85.28% JavaScript 8.33% HTML 6.39%
react image-zoom zoom-images zoomable-images magnify image-magnification typescript

react-simple-image-zoom's People

Contributors

aaronlifton avatar dependabot[bot] avatar oscaroceguera avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

react-simple-image-zoom's Issues

Error: Can't resolve 'ReactDOM' in 'node_modules/react-simple-image-zoom/dist'

Hi,

I'm getting this error when attempting to use ImageZoom in my project

./node_modules/react-simple-image-zoom/dist/ReactSimpleImageZoom.js
Module not found: Error: Can't resolve 'ReactDOM' in '/myproject/node_modules/react-simple-image-zoom/dist'
 @ ./node_modules/react-simple-image-zoom/dist/ReactSimpleImageZoom.js 1:102-121

It seems like it has something to do with case-sensitive-paths-webpack-plugin (which I don't use in my project) and externals definition in webpack.config.js
https://github.com/aaronlifton2/react-simple-image-zoom/blob/aa0b5a9376a3c7501c9a63154581d588f1272d1a/webpack.config.js#L27

My development webpack config is the following

const merge = require('webpack-merge');
const environment = require('./environment');
const FlowWebpackPlugin = require('flow-webpack-plugin');

const devConfig = {
  module: {
    rules: [
      {
        enforce: 'pre',
        test: /\.js(x?)$/,
        exclude: /node_modules/,
        loader: 'eslint-loader',
        options: {
          emitWarning: true,
        },
      },
    ],
  },
  plugins: [
    new FlowWebpackPlugin({
      reportingSeverity: 'warning',
      flowPath: require.main.require('flow-bin'),
      flowArgs: ['--color=always', 'frontend'],
    }),
  ],
};

module.exports = merge(environment.toWebpackConfig(), devConfig);

Can you please advice how to work around this problem?

The Module Is not Working

Hi, I am Using Next js 12. 2 with Typescript and trying to use the module to Zoom the Image but I am getting the below error whenever I Import that in Component. Let Me Help Regarding This.
I have attached the image of Error that Window is not Defined
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.