andreypopp / react-fa

DEPRECATED: use https://github.com/FortAwesome/react-fontawesome instead
http://andreypopp.github.io/react-fa/
489 stars 42 forks source link

"chunk" deploy building my app #41

Closed msimonc closed 8 years ago

msimonc commented 8 years ago

I'm using latest Babel, Webpack to build. This is a strange one because I recently converted my app to "chunk" the deploy build based on: https://github.com/echenley/react-router-huge-apps-refactor. Before that Icon worked fine. Then I got issues with react-fa during dev build as follows. So I've stopped using Icon for now.

ERROR in ./~/font-awesome/fonts/fontawesome-webfont.woff2?v=4.6.3 Module parse failed: /Projects/TrailerShare/ts-client/node_modules/font-awesome/fonts/fontawesome-webfont.woff2?v=4.6.3 Unexpected character '' (1:4) You may need an appropriate loader to handle this file type. SyntaxError: Unexpected character '' (1:4) at Parser.pp$4.raise (/Projects/TrailerShare/ts-client/node_modules/acorn/dist/acorn.js:2221:15) at Parser.pp$7.getTokenFromCode (/Projects/TrailerShare/ts-client/node_modules/acorn/dist/acorn.js:2756:10) at Parser.pp$7.readToken (/Projects/TrailerShare/ts-client/node_modules/acorn/dist/acorn.js:2477:17) at Parser.pp$7.nextToken (/Projects/TrailerShare/ts-client/node_modules/acorn/dist/acorn.js:2468:15) at Parser.pp$7.next (/Projects/TrailerShare/ts-client/node_modules/acorn/dist/acorn.js:2413:10) at Parser.pp$3.parseIdent (/Projects/TrailerShare/ts-client/node_modules/acorn/dist/acorn.js:2191:10) at Parser.pp$3.parseExprAtom (/Projects/TrailerShare/ts-client/node_modules/acorn/dist/acorn.js:1774:21) at Parser.pp$3.parseExprSubscripts (/Projects/TrailerShare/ts-client/node_modules/acorn/dist/acorn.js:1715:21) at Parser.pp$3.parseMaybeUnary (/Projects/TrailerShare/ts-client/node_modules/acorn/dist/acorn.js:1692:19) at Parser.pp$3.parseExprOps (/Projects/TrailerShare/ts-client/node_modules/acorn/dist/acorn.js:1637:21) at Parser.pp$3.parseMaybeConditional (/Projects/TrailerShare/ts-client/node_modules/acorn/dist/acorn.js:1620:21) at Parser.pp$3.parseMaybeAssign (/Projects/TrailerShare/ts-client/node_modules/acorn/dist/acorn.js:1597:21) @ ./~/css-loader!./~/font-awesome/css/font-awesome.css 6:479-532

andreypopp commented 8 years ago

Hard to say what's wrong without seeing your config. I guess the loader for fronts is not correctly configured. Does it includes /\.woff2\?v=\d\.\d\.\d/ test?

andreypopp commented 8 years ago

Closing as this is not an issue with react-fa feel free to continue discussion here.

msimonc commented 8 years ago

Thanks for the pointer, finally got it. Checked both dev and prod:

            test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/,
            loader: 'url?prefix=font/&limit=5000'