Closed amsardesai closed 2 years ago
Context: I'm trying to use style9 in a project where front-end code gets rendered on a node server (i.e for server side rendering). Whenever I do this, I get the following error:
.../node_modules/style9/index.js:28 export default function style9(...styles) { ^^^^^^ SyntaxError: Unexpected token 'export'
Node doesn't recognize the import/export syntax in this file because there is no "type: module" declaration in the package.json.
This PR fixes the issue by using the CommonJS syntax in index.js, so that the module is parseable by node.
Fixed in 0.14.0
Context: I'm trying to use style9 in a project where front-end code gets rendered on a node server (i.e for server side rendering). Whenever I do this, I get the following error:
Node doesn't recognize the import/export syntax in this file because there is no "type: module" declaration in the package.json.
This PR fixes the issue by using the CommonJS syntax in index.js, so that the module is parseable by node.