responsiveness icon indicating copy to clipboard operation
responsiveness copied to clipboard

Problema ao usar com o create-react-app

Open joaoeffting opened this issue 8 years ago • 3 comments

Estou usando o Create-react-app ... ao importar o Grid, da o seguinte erro:

Module parse failed: /Users/joaopauloeffting/Documents/desenvolvimento/todo-list/node_modules/@entria/responsiveness/src/index.js Unexpected token (1:7) You may need an appropriate loader to handle this file type. | export Grid from './grid'; |

joaoeffting avatar Jul 05 '17 21:07 joaoeffting

Vou tentar entender esse problema nessa finde ... achei a lib simples e bem útil. Quero usar :c haha

joaoeffting avatar Jul 07 '17 12:07 joaoeffting

the problem is in these 3 lines: https://github.com/entria/responsiveness/blob/master/package.json#L15-L17

we wanna deliver src and lib on npm, so we can tree shake this module using webpack

maybe this could help https://github.com/indutny/webpack-common-shake for commonjs packages

sibelius avatar Jul 07 '17 13:07 sibelius

@joaoeffting if you want use responsiveness before the solution be published, just change "module": "src/index.js" to "module": "lib/index.js" on package.json.

Is a kludge, but works for now. :sweat_smile:

joao-alberto avatar Jul 13 '17 17:07 joao-alberto