Releases: Laffery/webpack-starter-kit
0.5.1
Version 0.5.1 released🎉
In this minor version, we made the npm package @laffery/webpack-starter-kit
deprecated, and released a new package @laffery/create-webpack-app
to support package managers' create API, thus you can create a new app by one of the following commands:
npm create @laffery/webpack-app@latest
# or yarn
yarn create @laffery/webpack-app
# or pnpm
pnpm create @laffery/webpack-app
Enjoy your coding! :)
0.4.0
Version 0.4.0 🎉
What Changes
yarn is not the default package manager
We remove yarn.lock
or other version lock files in templates, use npm
as the default npm scripts runner.
In fact, feel free to use what package manager you like.
SSR
-
Upgrade typing declaration of the app, feel free to use these types directly
- import { GetServerSideProps } from 'app';
-
Upgrade
SSR_DATA
management, make sure it is isomorphic between server-side and client-sideIt is useful because there will be a case that you wanna get the current location:
const { pathname } = window.location;
but
window
is not defined, how can we get the right location here?
We add location data in context, that you can create a simple hookuseLocation
like this:import { Context, useContext } from "shared/context"; function useLocation() { const context = useContext(Context); if (typeof window === "undefined") return context.location; return window.location.pathname; }
Full Changelog: v0.3.13...v0.4.0
0.3.13
Break Changes
-
React18 is supported, thus we append two new templates 3d3651f
react18-ts
react18-ssr-ts
-
Serverless API in SSR is supported, write your API handlers in
server/services
, then visithttp://localhost:3000/api/echo
3852b8e
router.get("/echo", (req, res) => {
return res.end("hello world");
});
// hello world
Full Changelog: v0.3.8...v0.3.13
0.3.8
0.3.8 🎉
Break Changes
- Fix problem with binding event to the VDOM on the client-side with truly
hydrating
, you can really useuseState
,useEffect
or any other hooks inSSR
mode - Conventional routing is supported
- Use
cross-env
to figure out cross-platform usage
Now you can feel free to run npx create-app my-app
to create you own app and enjoy coding!
Full Changelog: v0.3.4...v0.3.8
0.3.4
0.3.4 🎉
Break Changes
- Isomorphism
SSR
withCSR
and hybrid mode is supported - CLI
Usage: create app <name> [options]
Arguments:
name project name (default: "my-app")
template template name (default: "react-ts")
Options:
-V, --version output the version number
-O, --output <string> output directory (default: ".")
-l, --list list all templates available
-t, --template <string> project template name
-h, --help display help for command
Now you can feel free to run npx create-app my-app
to create you own app and enjoy coding!
Full Changelog: v0.2.0...v0.3.4
0.2.0
0.1.3
Webpack Starter [email protected]
Features
- Typescript paths resolution support
- you can import a
*.tsx
file without the extension - you can configure the
baseUrl
in the tsconfig.json
- you can import a
0.1.2
Webpack Starter [email protected]
Features
- Construct a React App from scratch by
webpack5
- Typescript support
- CSS support
- yarn scripts for
dev
|start
|build