This repository was archived by the owner on Feb 19, 2022. It is now read-only.
move to webpack-dev-server; separate webpack configs; add html-webpack-plugin#39
Open
DSchau wants to merge 1 commit intoFormidableLabs:masterfrom
Open
move to webpack-dev-server; separate webpack configs; add html-webpack-plugin#39DSchau wants to merge 1 commit intoFormidableLabs:masterfrom
DSchau wants to merge 1 commit intoFormidableLabs:masterfrom
Conversation
- Adding webpack-dev-server - Moving dev/prod functionality into separate files for webpack config - Add html-webpack-plugin to automatically inject scripts
DSchau
commented
May 2, 2017
| "deploy": "npm run clean & npm run build && surge -p .", | ||
| "start": "cross-env NODE_ENV=development node server.js" | ||
| "deploy": "npm run clean & npm run build && surge -p dist", | ||
| "start": "cross-env NODE_ENV=development webpack-dev-server --hot --port 3000 --content-base dist --config webpack.config.development.js" |
Author
There was a problem hiding this comment.
Self-explanatory, but swap out the custom express server and just use webpack dev server. Hot reloading and everything (to the best of my knowledge/testing) still works!
| "surge": "latest", | ||
| "url-loader": "^0.5.6", | ||
| "webpack": "2.2.0", | ||
| "webpack": "~2.4.1", |
| @@ -0,0 +1,43 @@ | |||
| /* eslint-disable */ | |||
|
|
|||
Author
There was a problem hiding this comment.
We could improve this whole file by switching to webpack-merge or the like, but didn't want to get too crazy off of the bat
| test: /\.gif$/, | ||
| loader: "url-loader?mimetype=image/gif", | ||
| include: path.join(__dirname, "assets") | ||
| test: /\.(png|jpe?g|gif)$/, |
Author
There was a problem hiding this comment.
Merged these loaders, not sure if the mimetype was doing a whole bunch. If so, I'll switch it back!
DSchau
commented
May 2, 2017
| new webpack.NoEmitOnErrorsPlugin() | ||
| ]); | ||
|
|
||
| config.module.rules[0] = { |
Author
There was a problem hiding this comment.
Don't like that this requires the first item to always be the js|jsx loader. Open to other approaches...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello!
I found that this boilerplate is great (as is spectacle), but there are some simple tweaks I think we could make to possibly move to more of a standard config
As such, I made a bunch of them. Here's a high level list, and I'll try and go through and add comments to the files when appropriate.
Please let me know if there's anything else I can do to help out/improve this PR.
Long-term, I'd love to get a fork of create-react-app working that supports markdown (and other necessary functionality of spectacle) and just use that, but I still think there's value in these changes.
Thanks!