remoteinterview / zero

Zero is a web server to simplify web development.

Home Page:https://zeroserver.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

unable to import css from a dependency

longilineo opened this issue · comments

Everything works until I import css from a dependency. For example I need to import antd stylesheet using:

import 'antd/dist/antd.min.css';

On building I get this error:

/app/node_modules/antd/dist/antd.css:15
body {
^
SyntaxError: Unexpected token '{'
at Module._compile (internal/modules/cjs/loader.js:895:18)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
at Module.load (internal/modules/cjs/loader.js:815:32)
at Function.Module._load (internal/modules/cjs/loader.js:727:14)
at Module.require (internal/modules/cjs/loader.js:852:19)
at require (internal/modules/cjs/helpers.js:74:18)
at newRequire (/app/.zero/zero-builds/da39a3ee5e6b4b0d3255bfef95601890afd80709/bundle.node.js:35:18)
at localRequire (/app/.zero/zero-builds/da39a3ee5e6b4b0d3255bfef95601890afd80709/bundle.node.js:54:14)
at Object.parcelRequire.index.jsx (/app/.zero/zero-builds/da39a3ee5e6b4b0d3255bfef95601890afd80709/bundle.node.js:133:1)
at newRequire (/app/.zero/zero-builds/da39a3ee5e6b4b0d3255bfef95601890afd80709/bundle.node.js:48:24)
⚠️ SSR didn't work for . Some component might not be SSR compatible.

I confirmed this error and will look into this. As a workaround, this works:
import './node_modules/antd/dist/antd.css';

Fixed in v1.1.11(347d1e8). Please try it with the latest and re-open if it still happens.