Skip to content

Releases: Laffery/webpack-starter-kit

0.5.1

10 Oct 14:30
Compare
Choose a tag to compare

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

10 Apr 15:19
Compare
Choose a tag to compare

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

  1. Upgrade typing declaration of the app, feel free to use these types directly

    - import { GetServerSideProps } from 'app';
  2. Upgrade SSR_DATA management, make sure it is isomorphic between server-side and client-side

    It 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 hook useLocation 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

10 Apr 03:46
Compare
Choose a tag to compare

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 visit http://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

28 Mar 15:15
Compare
Choose a tag to compare

0.3.8 🎉

Break Changes

  • Fix problem with binding event to the VDOM on the client-side with truly hydrating, you can really use useState, useEffect or any other hooks in SSR 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

26 Mar 05:58
Compare
Choose a tag to compare

0.3.4 🎉

Break Changes

  • Isomorphism SSR with CSR 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

22 Mar 02:40
e84a1fd
Compare
Choose a tag to compare

0.2.0

Features

  • 🎉 simple SSR support
  • templates in the packages folder

0.1.3

19 Dec 12:12
Compare
Choose a tag to compare

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

0.1.2

19 Dec 07:53
Compare
Choose a tag to compare

Webpack Starter [email protected]

Features

  • Construct a React App from scratch by webpack5
  • Typescript support
  • CSS support
  • yarn scripts for dev | start | build