Closed kifahhk closed 8 years ago
Hey @kifahhk, I'm currently unable to reproduce. Could you fork the project or create a test repo that I can use to reproduce?
Make sure you are running npm run build
and NOT npm build
. The latter will do nothing as it is a native npm command. See npm help build
for more details.
Currently I run:
git clone iansinnott/react-static-boilerplate
cd react-static-boilerplate
npm install
npm run build
And everything works as expected.
Thanks for bringing to my attention. I went back and noticed that I had the wrong command listed in the Readme. Updated now. Let me know if using npm run build
fixes your issue.
Hello @iansinnott , thanks for replying, I just got the problem.
use the keyword SET for node to assign "production" to NODE_ENV
i.e:
SET NODE_ENV=production & webpack --config webpack.config.prod.js
instead of
NODE_ENV=production webpack --config webpack.config.prod.js
It works like charming! ofc with "npm run build"
I also would like to give relative public paths instead of root.
e.g:
new StaticSitePlugin({ src: 'app', stylesheet: './app.css', favicon: './favicon.ico', }),
maybe you can add this in readme for windows users
Nice! I'm glad you got it working on a windows system. I created a new issue about Windows support.
I also would like to give relative public paths instead of root.
I'm not quite sure what you mean here. Could you elaborate?
Since we are talking about static App, I don't see it harmful to link the style for example:
like this;
<link rel='stylesheet' href='./app.css' />
// relative to the working directory
instead of:
<link rel='stylesheet' href='/app.css' />
// root directory
but forget about it, It's not necessary
OK, thanks for closing this out. Let me know if you run into any other issues.
Hello,
npm build does not seem to do anything. I tried frustrated to get it working, but no use. am I missing anything?
OS: Windows npm: 3.8.0 node: 4.3.1