Skip to content

Commit 1221712

Browse files
nimaa77jaredpalmer
authored andcommitted
Sync the next branch with master (#794)
* v2 (#630) * Webpack v4 (#525) * (feat) Adds webpack v4, removes CommonsChunkPlugin and sets mode * (feat) Yarn locks * (feat) Removes NamedModulesPlugin and NoEmitOnErrorsPlugin * (feat) Upgrades eslint-loader and replaces setup for before (devServer) * (feat) Updates some loaders to work with webpack v4 * Add thread-loader, [email protected] Adds thread-loader and extract-text-webpack-plugin beta. * Remove automatic vendor bundling, add @todo * Remove lock * (fix) Fixes Inferno, JSXstyle, Reason, Typescript and WithVendor * Fix TS HMR * Bump to latest webpack * Update README.md * Move to Yarn Workspaces, fix tests * Remove unused scripts for bootstrap and clean * v2.0.0-alpha.1 * v2.0.0-alpha.2 * v2.0.0-alpha.3 * Drop extract-text for mini-css. Bump start-server (no more refreshes) * Update docs with new hot restart behavior * Make `rs` an h3 in docs * v2.0.0-alpha.4 * Update package descriptions * Bump mini-css-extract-plugin to 0.3.0 (#559) * Add Multistep true so webpack 4 HMR can work (#558) * Bump deps, fix TS example * v2.0.0-alpha.5 * Changed name of the about page component: Home -> About (#561) * chore(package): update lerna to version 2.9.1 (#560) * including polyfills in production build (#562) * Fix logic on polyfill inclusion * v2.0.0-alpha.6 * Fix boolean * v2.0.0-alpha.7 * s/your/you (#566) * Replace clientCompiler before serverCompiler (#569) * Update README.md (#564) Fixed links to Node Inspector docs * Add an example with Hyperapp (#549) * Setup Hyperapp example Enable HMR Don't touch the yarn lock Cleanup Keep naming convention Don't touch preact Reverse formatting on the preact example * Undo formatting something in the preact example Fix formatting Fix formatting Fix formatting Fix format * 2.0.0-alpha.7 * Bump hyperapp version * Add Koa usage example (#533) * Add Koa usage example * Extend Koa example documentation * Make app use default koa styles and logo * Correct Koa URL on doc * Add webpack bar (#563) * Remove yarn.lock from Koa example * Bump deps * v2.0.0-alpha.8 * add emitFile in url-loader options (#576) * Add elm-package post on circleci * Move elm install to dependencies.pre * Use npm to install elm globally * Install elm not elm-package. lol. * Bump deps * v2.0.0-y.0 * Update readme * v2.0.0-alpha.9 * Limiting HMR to App (#577) * #fix starting server code after compile assets (sync) (#575) * Use webpack-dev-server-speedy for perf boost! * v2.0.0-alpha.10 * Bump Webpack to 4.6.0 * v2.0.0-alpha.11 * Fix uglify options * v2.0.0-alpha.12 * Update ESLint (#588) * Upgrade typescript example (#589) * ♻️ Cleanup random keystrokes in Home component * ✨ Upgrade deps and TypeScript. Now supports the new fragment syntax<></> * 👨🏼‍🎨 Add myself to the contributers list * 📏 Prietier linting fixes * Update README.md * Update README.md * Better defaults for Typescript example (#593) * Better defaults for Typescript example After running into multiple bugs having to deal with whether typescript was precompiling the same way that the babel version was (some include: jest testing, repl loading, mjs support) I realized that the big issue is that razzle had figured out solutions for each env based on webpack, so instead of having the added complexity of not knowing if I had proper typescript parody, I figured just remove that layer and use typescript for the one thing I wanted: type checking. Happy to go into detail on those bugs, but I think the main point is this approach seems a better DX experiance out of the box, while offering more heavy solutions as comments. * Update razzle.config.js * Remove raf from examples (#601) * Remove raf from all examples * Add package-lock and yarn-lock to .gitignore in examples. * Change env stringify so it doesn't overwrite process.env (#611) * Razzle plugins + razzle-typescript-plugin (#605) * Add a plugin system * Add razzle-typescript-plugin * Change TypeScript example to use razzle-typescript-plugin * Small refactor to helpers * Add myself to contributors * Use fork-ts-checker-webpack-plugin instead of tslint-loader * Make useBabel false by default * Add esModuleInterop, remove console tslint rules * Improve README * Moved loaderFinder to razzle-dev-utils * Remove -- from circle.yml * Fix start test now that logger has changed * Fix shell output * Don't silence razzle build test * Teardown beforeAll * Remove 'use strict' from build fixtures * Update README for v2 * v2.0.0 * Fix #632. Pass webpack to config in build.js * v2.0.1 * 👨🏻‍💻 Include all contributors (#631) * Removing thread-loader (#634) * v2.0.2 * Include the crossorigin attribute link updated (#635) reason: It seems that the content is moved since to this new URL. * Adding server source map support (#516) * Bump deps * Boost perf of TS plugin during dev with suggested Outlook optimizations * v2.0.3 * Fix useBabel use option in razzzle-plugin-typescript (#639) * Add useEslint option to razzle-plugin-typescript (#640) Useful if you wish to use babel, without eslint * Update readme's * v2.0.4 * Upgrade razzle package - jest ^22.4.3 (#648) * Upgrade razzle package - jest ^22.4.3 * Revert version no change * Close #653. Use correct Snyk badges * Update babel-eslint to 8.x so that decorators will work using babel-plugin-transform-decorators-legacy. See: babel/babel-eslint#275 (#649) * Add carrot to babel-eslint * Remove consola (redundant) * v2.1.0 * Add WebpackConfigHelpers + Vue, Elm plugins (#655) * Add WebpackConfigHelpers + Vue, Elm plugins * Fix elm plugin * Add razzle-plugin-php * Add disclaimer about php plugin * More patches * fix elm plugin * Update elm * Add info about razzle-plugin-elm * Update docs * v2.1.1 * Fix package names * Fix 'server' typo (#658) * latest jest (#656) * Bump deps * Squat on more potential plugins * v2.2.0 * Bump babel-loader to remove incompatibility warning with Webpack 4. (#659) * Fix Elm example (#661) * preserve the full --inspect= flag as passed to yarn start (#660) * preserve the full --inspect= flag as passed to yarn start instead of treating it as a boolean * update --inspect docs & comments * added example razzle + react router 3 (#539) * added example razzle + react router 3 * Remove yarn.lock * Fix pkg.json * Add polka example (#520) * Add polka example Serves as a generic express middleware-compatible server example. (related to jaredpalmer/after.js#77) * Remove with-polka/setupTests.js * Remove yarn.lock * Adding testEnvironmentOptions to supportedKeys for Jest (#678) * fix koa hmr (#693) * Add pretty node errors (#691) * Ignore column from source map and only use pretty errors if file is read (#696) * Add documentation for CSS Modules (#694) * Erik Engi added to the contributors section (#700) * Update README.md * Introduce config.modifyBabelOptions (#702) I’ve found that the babel configuration is important to modify in my environment. Specifically in my env, I’d like to set `babelrc: false` so that the .babelrc file is ignored, and a custom babel configuration could be provided in the `razzle.config.js`. * add support for function as plugin (#704) * add mdx loader (#711) * Mdx improve (#712) * add peer dependency, ipdate install instruction * update readme * Fix .mjs issue with GraphQL 0.13.2 (#715) * Fix .mjs issue with GraphQL 0.13.2 graphql/graphql-js#1272 (comment) * Fix .mjs still referencing "require" aws-amplify/amplify-js#686 (comment) * remove package-lock.json * Make readme's match * v2.3.0 * Revert "v2.3.0" This reverts commit 361bb0c. * v2.4.0 * Fix production sourcemaps (#717) * Create stale.yml * Add loadable-components example (#598) * Update createJestConfig.js (#719) Add globals to the allowable jest config overrides * Use the correct port when PORT is not set (#723) * Add Now deployment example (#728) * Duplicated basic example * Renamed package name * Updated readme for Now * Added post Now build process hook * Tweaked README format and content * Add Heroku deployment example (#727) * Duplicated basic exmaple * Updated readme with Heroku instructions * Renamed package name * added Heroku post-build command in Procfile * Updated package.json: - added post pre-start hook to trigger build on Heroku - moved razzle to main deps for Heroku build process * Consistent reference to Heroku app name * Update README.md * Update package.json * Update README.md * Fix for '[HMR] You need to restart the application!' on server sided err * Mdx plugin improvements (#732) * resolving path to @mdx-js/tag, fix loader options * del peerDep, improve readme * add example * Change import to require * cleanup: remove .js extensions from require * React Loadable example: add css chunks (#746) * point people looking at CHANGELOG.md to the release notes page (#747) * Update css chunks: use [name] instead of [id] (#750) * Fix HMR : client was not working + mismatch between server/client (#749) * remove mention of extract text plugin from react native web example (#752) * Update examples to recover from HMR error (#763) * add CLIENT_PUBLIC_PATH env var for local dev environments that don't use localhost (e.g. VMs, Docker) (#761) * Set template package version back to 0.1.0 (#760) * CLIENT_PUBLIC_PATH default was being set in two places that computed different values. Remove the erroneous one. (#779) * Correct example name in curl (#772) * Feature/scss plugin (#786) * add scss plugin and fixes to makeLoaderFinder * add readme for scss plugin * fix test regex for including .css * remove jest forceExit * add contributors * refactor tests * add plugin options * edit readme for better options knowledge * change node-sass to node-sass-chokidar * Use npx (#783)
1 parent 49022bf commit 1221712

File tree

205 files changed

+16425
-1261
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

205 files changed

+16425
-1261
lines changed

.all-contributorsrc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,17 @@
7676
"example",
7777
"plugin"
7878
]
79+
},
80+
{
81+
"login": "rayandrews",
82+
"name": "Ray Andrew",
83+
"avatar_url": "https://avatars1.githubusercontent.com/u/4437323?v=4",
84+
"profile": "https://www.linkedin.com/in/ray-andrew/",
85+
"contributions": [
86+
"code",
87+
"example",
88+
"plugin"
89+
]
7990
}
8091
]
8192
}

.github/stale.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Number of days of inactivity before an issue becomes stale
2+
daysUntilStale: 60
3+
# Number of days of inactivity before a stale issue is closed
4+
daysUntilClose: 7
5+
# Issues with these labels will never be considered stale
6+
exemptLabels:
7+
- pinned
8+
- security
9+
# Label to use when marking an issue as stale
10+
staleLabel: stale
11+
# Comment to post when marking an issue as stale. Set to `false` to disable
12+
markComment: >
13+
Hola! So here's the deal, between open source and my day job and life and what not, I have a lot to manage, so I use a GitHub bot to automate a few things here and there. This particular GitHub bot is going to mark this as stale because it has not had
14+
recent activity for a while. It will be closed if no further activity occurs in a few days. Do not take this personally--seriously--this is a completely automated action. If this is a mistake, just make a comment, DM me, send a carrier pidgeon, or a smoke signal.
15+
# Comment to post when closing a stale issue. Set to `false` to disable
16+
closeComment: >
17+
ProBot automatically closed this due to inactivity. Holler if this is a mistake, and we'll re-open it.

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
See [Release Notes](https://github.com/jaredpalmer/razzle/releases)

README.md

Lines changed: 158 additions & 21 deletions
Large diffs are not rendered by default.

examples/basic/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "razzle-examples-basic",
3-
"version": "2.0.0-alpha.12",
3+
"version": "2.4.0",
44
"license": "MIT",
55
"scripts": {
66
"start": "razzle start",
@@ -14,6 +14,6 @@
1414
"react-dom": "^16.0.0"
1515
},
1616
"devDependencies": {
17-
"razzle": "^2.0.0-alpha.12"
17+
"razzle": "^2.4.0"
1818
}
1919
}

examples/basic/src/index.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
import express from 'express';
2-
import app from './server';
2+
3+
let app = require('./server').default;
34

45
if (module.hot) {
56
module.hot.accept('./server', function() {
67
console.log('🔁 HMR Reloading `./server`...');
8+
try {
9+
app = require('./server').default;
10+
} catch (error) {
11+
console.error(error);
12+
}
713
});
814
console.info('✅ Server-side HMR Enabled!');
915
}

examples/with-afterjs/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "razzle-examples-with-afterjs",
3-
"version": "2.0.0-alpha.12",
3+
"version": "2.4.0",
44
"license": "MIT",
55
"scripts": {
66
"start": "razzle start",
@@ -11,7 +11,7 @@
1111
"dependencies": {
1212
"@jaredpalmer/after": "latest",
1313
"express": "^4.16.2",
14-
"razzle": "^2.0.0-alpha.12",
14+
"razzle": "^2.4.0",
1515
"react": "^16.2.0",
1616
"react-dom": "^16.2.0",
1717
"react-helmet": "^5.2.0",

examples/with-afterjs/src/index.js

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,27 @@
1-
import app from './server';
2-
import http from 'http';
1+
import express from 'express';
32

4-
const server = http.createServer(app);
5-
6-
let currentApp = app;
7-
8-
server.listen(process.env.PORT || 3000, error => {
9-
if (error) {
10-
console.log(error);
11-
}
12-
13-
console.log('🚀 started');
14-
});
3+
let app = require('./server').default;
154

165
if (module.hot) {
17-
console.log('✅ Server-side HMR Enabled!');
18-
19-
module.hot.accept('./server', () => {
6+
module.hot.accept('./server', function() {
207
console.log('🔁 HMR Reloading `./server`...');
21-
server.removeListener('request', currentApp);
22-
const newApp = require('./server').default;
23-
server.on('request', newApp);
24-
currentApp = newApp;
8+
try {
9+
app = require('./server').default;
10+
} catch (error) {
11+
console.error(error);
12+
}
2513
});
14+
console.info('✅ Server-side HMR Enabled!');
2615
}
16+
17+
const port = process.env.PORT || 3000;
18+
19+
export default express()
20+
.use((req, res) => app.handle(req, res))
21+
.listen(port, function(err) {
22+
if (err) {
23+
console.error(err);
24+
return;
25+
}
26+
console.log(`> Started on port ${port}`);
27+
});

examples/with-custom-babel-config/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "razzle-examples-with-custom-babel-config",
3-
"version": "2.0.0-alpha.12",
3+
"version": "2.4.0",
44
"license": "MIT",
55
"scripts": {
66
"start": "razzle start",
@@ -17,6 +17,6 @@
1717
},
1818
"devDependencies": {
1919
"babel-preset-stage-0": "^6.22.0",
20-
"razzle": "^2.0.0-alpha.12"
20+
"razzle": "^2.4.0"
2121
}
2222
}

examples/with-custom-babel-config/src/index.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
import express from 'express';
2-
import app from './server';
2+
3+
let app = require('./server').default;
34

45
if (module.hot) {
56
module.hot.accept('./server', function() {
67
console.log('🔁 HMR Reloading `./server`...');
8+
try {
9+
app = require('./server').default;
10+
} catch (error) {
11+
console.error(error);
12+
}
713
});
814
console.info('✅ Server-side HMR Enabled!');
915
}

0 commit comments

Comments
 (0)