Questions tagged [nwb]
23 questions
1
vote
1 answer
nwb build-react-app creates root path rather than relative path
I am testing out nwb to streamline building react apps using this example project. While the app is built, the path of css and js files referenced in index.html are in root rather than relative. Is there any way to change the referencing?
For…

William Maio
- 99
- 2
- 8
0
votes
1 answer
How to configure CSS Mdoules with NWB on sass files
I am creating a react component with NWB. The folder structure looks like below.
* components/
** src/
*** Component1/
**** index.js
**** index.module.scss
*** Component2/
** nwb.config.js
** package.json
How can I implement CSS modules in this…

cooskun
- 558
- 1
- 5
- 20
0
votes
2 answers
execute injecting logic only in UMD bundle
I use react nwb toolkit for my lib, I also uses UMD bundles.
So for UMD bundle size optimize, I inject one of components through "script" tag, and this injecting needed only when use the UMD bundle, because in normal lib this lib comes from…

stoner
- 161
- 9
0
votes
1 answer
How do I include my custom Component using `require` instead of `include`
I have built a simple React Component using nwb as described in this guide.
It's a very simple Component that is just a button:
import t from 'prop-types'
import React, {Component} from 'react'
class LoadingButton extends Component {
static…

a53-416
- 3,585
- 6
- 34
- 44
0
votes
1 answer
How do I create a custom webpack loader that still compiles my react code properly?
I'm trying to build a custom loader to use in my NWB React project. I'd just like to create a custom loader that does nothing, but maintains the proper compilation for my react components. I can't seem to get the loaders to run in the proper order,…
0
votes
2 answers
How i can start nwb in https?
I have this package.json script:
"scripts": {
"build": "nwb build-react-component",
"clean": "nwb clean-module && nwb clean-demo",
"start": "nwb serve-react-demo --host 127.0.0.1 --port 3000",
"test": "nwb test-react",
…

Dariusz Rup
- 11
- 3
0
votes
1 answer
No stylesheet generated by styled-components on nwb reusable component
I've built a reusable react component through nwb new react-component fade-preloader called FadePreloader which uses styled-components, its published on npm so I can use it on other projects, but when its imported as a module its styles are never…

walter_dl
- 309
- 1
- 3
- 11
0
votes
1 answer
Configure phantomjs to work with webpack and karma nwb
I am using nwb to configure a react app, I would use like to chai and enzyme to set up my testing environment. I have made the following changes to accomplish this, I created a tests.webpack.js file:
import chai from 'chai';
import chaiEnzyme from…

vamsiampolu
- 6,328
- 19
- 82
- 183