chentsulin / generator-redux-app Goto Github PK
View Code? Open in Web Editor NEWScaffold out a redux app
License: MIT License
Scaffold out a redux app
License: MIT License
The way environment variables are set in npm scripts within package.json
are not supported on all platforms.
Not sure if this is a problem with my set up, or your generator, but just in case, here it is:
I was unable to use the Yoman generator because it errored out when I didn't provide a user name, or website URL. Entering dummy values for those fields gives me a NodeJs error:
ERROR in ./src/createRoutes.js
File/Program node, we can't possibly find a statement parent to this
module.js:334
throw err;
^
Error: Cannot find module '/Users/pengyuzhao/Study/react/webpack.config.production.js'
at Function.Module._resolveFilename (module.js:332:15)
at Function.Module._load (module.js:282:25)
at Module.require (module.js:361:17)
at require (module.js:380:17)
at module.exports (/Users/pengyuzhao/Study/react/node_modules/webpack/bin/convert-argv.js:80:13)
at Object. (/Users/pengyuzhao/Study/react/node_modules/webpack/bin/webpack.js:39:40)
at Module._compile (module.js:426:26)
at Object.Module._extensions..js (module.js:444:10)
at Module.load (module.js:351:32)
at Function.Module._load (module.js:306:12)
When npm installing I received an error about cross-env. Can you list this as a dependency in the package.js file?
Hi,
Awesome work!
I've added html-webpack-plugin - but I noticed the npm start doesn't really run wepback.
This is the plugins section on webpack.config.js
plugins: [
new HtmlwebpackPlugin(),
new webpack.HotModuleReplacementPlugin(),
new webpack.DefinePlugin({
'__DEVTOOLS__': true,
'process.env': JSON.stringify('development')
})
],
I had to change the "build" in scripts in package.json to:
"start": "webpack && node server.js",
Also in server.js I changed the index.html to the one that is generated:
res.sendFile(path.join(__dirname, 'dist/index.html'));
and index.js now has this:
const root = document.createElement('div');
document.body.appendChild(root);
ReactDOM.render(<Root history={history} />,root);
Am I missing something - is there a reason why you wouldn't want to run webpack before starting to develop and launching the dev server?
I believe html-webpack-plugin would minimize the need to maintain index.html.
any plans to add support for babel 6?
Hi!
I just started using this great generator today and I discovered a minor issue - due to the way Express in server.js
handles requests, you get index.html
in the response for favicon.ico
in dev mode.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.