react-native-nw-react-calculator icon indicating copy to clipboard operation
react-native-nw-react-calculator copied to clipboard

Build improvements

Open srgpqt opened this issue 10 years ago • 1 comments

Webpack has builtin functionality to do pretty much everything the Gruntfile does ; it makes no sense to use two different tools that do the same thing.

These commits rectify most of that situation.

srgpqt avatar Nov 08 '15 00:11 srgpqt

Thank you, that's a very interesting (and big) PR full of improvements.

I had a look at your modifications and here are the few details I found.

  • The livereload mecanism is broken in the NW.js App (as you use the same index.html, you removed the script to livereload.js)
  • It would be great if you could launch the website app behind the http://localhost:8000/webpack-dev-server/index.html url, it would have 2 advantages, first it would keep the "App hot update" banner, and second just after the first launch while webpack is building the app for the first time it would indicate it on the web page instead of having a empty web page.

Then I have some open questions:

  • I am not sure that having a common index.html file (for web and nw.js) is the best option because the templating language makes the file hard to read, some content shouldn't be on the NW.js side (the IE condition <!--[if lt IE 8]> for example as we know the engine included with NW) and I think some meta tags are irrelevant too inside a NW.js App.
  • Other question related to the previous, how I you do here to have different titles between Apps, would I need to customize it in the webpack.config.js file? <title>{%=o.htmlWebpackPlugin.options.title || 'Webpack App'%}</title>

I really like the way you reorganized the webpack config files, it makes the whole thing cleaner and easier. What you did with the package.web.json is a very good idea too. And I am glad that very soon I won't have the npm warnings about those peer deps ;)

Impressive work.

benoitvallon avatar Nov 13 '15 19:11 benoitvallon