✨ Create server-rendered universal JavaScript applications with no configuration
MIT License
Bot releases are hidden (Show)
Published by fivethreeo about 4 years ago
Published by fivethreeo about 4 years ago
Consider it experimental for now
To try it now:
npx create-razzle-app@finch testing --ignore-existing
cd testing
yarn add [email protected] --dev
yarn start
yarn build
yarn start:prod
yarn export
yarn start:static
yarn test
Published by fivethreeo about 4 years ago
Published by fivethreeo about 4 years ago
Published by fivethreeo about 4 years ago
Published by fivethreeo about 4 years ago
Published by fivethreeo about 4 years ago
Published by fivethreeo about 4 years ago
This is meant to prepare you for Razzle 4.0.
If you enable all the experimental features added you are better prepared for Razzle 4.0 where these features are defaults.
Will do a 3.4.0 release right after 3.3.0 stable is out with security related package upgrades.
After that there will be a 4.0.0 canary release.
// razzle.config.js
'use strict';
module.exports = {
experimental: {
newBabel: true,
newExternals: true,
newSplitChunks: true,
newContentHash: true,
newMainFields: true,
}
};
To try it now:
npx create-razzle-app@canary --example with-all-experimental testing --ignore-existing
cd testing
yarn start
yarn build
yarn start:prod
yarn export
yarn start:static
yarn test
Published by fivethreeo about 4 years ago
Published by fivethreeo about 4 years ago
Published by fivethreeo about 4 years ago
Published by fivethreeo about 4 years ago
Published by fivethreeo about 4 years ago
Here are some of the fixes and new features.
feat(razzle): make configuration promise based
fix: deprecate createConfig so plugin tests have time to update before next major release
feat(razzle): add support for typescript to razzle core
fix(css): make sure only one mini-css-extract-plugin is present
fix(razzle): fix issue with DEV_PORT env var and client only razzle start
feat(razzle): support paths in jsconfig and tsconfig
feat(create-razzle-app): add support for npm/github/git/file example templates
feat(less/scss): support postcss.config js and modules in less and scss plugin
feat(razzle): add support for postcss.config.js
feat(razzle): add experimental support for react-refresh
feat(examples): add with-single-exposed-port example
Published by fivethreeo about 4 years ago
Published by fivethreeo over 4 years ago
Published by fivethreeo over 4 years ago
Published by fivethreeo over 4 years ago
Huge thanks to @sumanbh for helping!
Published by fivethreeo over 4 years ago
Published by fivethreeo over 4 years ago
This is a patch release to fix some issues in 3.1.0
Huge thanks to @nimaa77 for helping!
Published by nimaa77 over 4 years ago
A new release after a long time, but no worries we have ci/cd for deployments now so we can tag a new release any time that we want. 🚀 (maybe two releases per month)
and we are working on razzle to make it the best SSR solution that you may ever find on Github.
if you need any new features or you had any questions ❓ feel free to open an issue, I and @fivethreeo are happy to help you guys.
index.js
and server.js
then index.html
file inside the public folder at the end pass --type=spa
to your package.json
's scripts like so:"scripts": {
- "start": "razzle start",
+ "start": "razzle start --type=spa",
- "build": "razzle build",
+ "build": "razzle build --type=spa",
"test": "razzle test --env=jsdom",
- "start:prod": "NODE_ENV=production node build/server.js"
+ "start:prod": "serve -s build/public"
}
https://github.com/jaredpalmer/razzle#build-types
2. Absolute Imports
create a new jsconfig.json
file in root of the project
{
"compilerOptions": {
"baseUrl": "src"
},
"include": ["src"]
}
and then you can use import files directly from src directory:
import Button 'components/Button';
(also works with typescript and tsconfig.json
)
razzle-plugin-scss
: now you can use CSS modules with sass filesimport styles from './home.module.scss'
# .env file
DOMAIN=www.example.com
RAZZLE_FOO=$DOMAIN/foo
RAZZLE_BAR=$DOMAIN/bar
Minor Changes and Patches are not complete in this list there many more, some of them listed here
Huge thanks to @fivethreeo for helping!