GithubHelp home page GithubHelp logo

remix-webpack-demo's Introduction

Remix Webpack Demo

This is an example of using Webpack as the compiler for a Remix app. While not supported as a long-term solution, we offer this example as a migration path for your React Router / Webpack apps to Remix.

To migrate your Webpack-based React Router app, check out the migration guide. ๐Ÿ‘€


How this repo was made:

  1. Create a new project with Create React App
  2. ๐Ÿ‘‰ Implement the React Router v6.4 tutorial
  3. ๐Ÿšš Migrate to Remix
  4. Replace standard Remix dev tools with Webpack-based compiler found in ./scripts

The commit history includes ๐Ÿ‘‰ and ๐Ÿšš emojis so you can follow along with which commits came from which step.

Setup

1 Install

npm install

2 .env

Copy .env.example as .env:

DATABASE_URL="file:./dev.db"

3 Initialize the database

npx prisma db push

If you want some data for development, seed the database:

npx prisma db seed

4 Run the app

# development
npm run dev

# production build
npm run build
npm start

Configuration

Webpack configs can be found at:

You can add loaders or plugins there to add support for any features you'd like from Webpack!

For example, you could install postcss-loader and add it to both the browser and server configs to get PostCSS features!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.