petyosi / react-virtuoso

The most powerful virtual list component for React
https://virtuoso.dev
MIT License
5.25k stars 301 forks source link

webpack: Failed to compile #16

Closed AyumiKai closed 5 years ago

AyumiKai commented 5 years ago

ERROR in ./node_modules/react-virtuoso/dist/react-virtuoso.es.production.js Module parse failed: /Users/xx/Desktop/xx/react-virtuoso/dist/react-virtuoso.es.production.js Unexpected token (1:12692) You may need an appropriate loader to handle this file type.

hi @petyosi , my packages version: "webpack": "^3.7.1", "@babel/core": "^7.1.2", "@babel/plugin-syntax-class-properties": "^7.0.0", "@babel/plugin-syntax-dynamic-import": "^7.0.0", "@babel/plugin-transform-runtime": "^7.1.0", "@babel/polyfill": "^7.0.0-rc.2", "@babel/preset-env": "^7.1.0", "@babel/preset-react": "^7.0.0",

petyosi commented 5 years ago

This does not ring a bell. I am using tsdx for the entire build/package setup, and the build artifacts work as expected in a CRA scaffold, Stackblitz, and CodeSandbox. What's the setup of your project? Perhaps you can compare it to the CRA scaffold and figure out what's the difference that causes this problem.

AyumiKai commented 5 years ago

This does not ring a bell. I am using tsdx for the entire build/package setup, and the build artifacts work as expected in a CRA scaffold, Stackblitz, and CodeSandbox. What's the setup of your project? Perhaps you can compare it to the CRA scaffold and figure out what's the difference that causes this problem.

yeah,It is my babel configuration problem