insin / nwb

A toolkit for React, Preact, Inferno & vanilla JS apps, React libraries and other npm modules for the web, with no configuration (until you need it)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Css styles not working in a production build

oldmill1 opened this issue · comments

This issue is a:

  • Question / support request

My setup is a basic React component setup. I have built a React component using the [documentation](Developing React Components and Libraries with nwb
) for building Components and Libraries with nwb, and I am importing styles in my app using import styles.css. The stylesheet is a fairly basic one. The styles work in my development server, but when I build my component, and import this app into another app, I get this error:

.container {
^
ParseError: Unexpected token

How do I make css files "just work." I am importing the app using a CommonJS build. My /lib folder does have the css file there, but it's just not being able to import.

Please forgive me if I am not explaining this clearly.

These checks might help you diagnose whether something is wrong with nwb or your setup:

Is the version of nwb you're using installed globally or locally?
globally

Which versions of Node.js, npm and nwb are you using (if using it globally)?

node -v v13.10.0
npm -v 6.14.6
nwb -v v0.25.2

Which modules are installed in your project?

@gadventures/travel-credits-module@1.0.0 /Users/ataxali/dev/travel-credits-module
├── @apollo/react-hooks@3.1.5
├── @apollo/react-testing@3.1.4
├── @babel/plugin-proposal-class-properties@7.10.1
├── @babel/plugin-transform-runtime@7.10.4
├── @babel/preset-env@7.10.4
├── @babel/preset-react@7.10.4
├── @testing-library/jest-dom@5.11.0
├── @testing-library/react@10.4.5
├── @types/react@16.9.42
├── apollo-boost@0.4.9
├── apollo-cache-inmemory@1.6.6
├── apollo-client@2.6.10
├── apollo-link-context@1.0.20
├── apollo-link-http@1.5.17
├── babel-jest@26.1.0
├── babel-polyfill@6.26.0
├── graphql@14.7.0
├── graphql-tag@2.10.3
├── jest@26.1.0
├── lodash.flowright@3.5.0
├── node-fetch@2.6.0
├── nwb@0.25.2
├── react@16.13.1
├── react-apollo@3.1.5
├── react-dom@16.13.1
├── styled-components@5.1.1
└── waait@1.0.5