Giter Club home page Giter Club logo

rspack-website's Introduction

rspack-website's People

Contributors

9aoy avatar ahabhgk avatar angelocore avatar bekzodnj avatar boshen avatar bvanjoi avatar chenjiahan avatar chuhoman avatar clarkkkk avatar fwqaaq avatar h-a-n-a avatar hardfist avatar hyf0 avatar ilteoood avatar iwanabethatguy avatar jerrykingxyz avatar jkzing avatar jserfeng avatar kyrielii avatar lingyucoder avatar lippzhang avatar octogonz avatar puppet-666 avatar sanyuan0704 avatar ulivz avatar underfin avatar xc2 avatar yanhaijing avatar zoolsher avatar zubb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rspack-website's Issues

Details in the migrate from cra guide

Hey! Just want to share some details that found on https://github.com/web-infra-dev/rspack-website/blob/main/docs/en/guide/migrate-from-cra.mdx#configure-rspackconfigjs section when trying to following it.

Found some extra spaces in these values:

Update: rspack only support copy-webpack-plugin@5

And the arg that is passed to the new CopyPlugin constructor, https://github.com/web-infra-dev/rspack-website/blob/main/docs/en/guide/migrate-from-cra.mdx?plain=1#L47, is different from what it is mentioned in https://webpack.js.org/plugins/copy-webpack-plugin/#options doc.

As a side note, when doing the changes for the plugin, i'm not able to run/build the project as it throws the next error:

> [email protected] build
> rspack build

[rspack-cli] [Error: napi error: GenericFailure - TypeError: compilation.getCache is not a function
    at /Users/***/Documents/projects/rspack-project/node_modules/copy-webpack-plugin/dist/index.js:693:33
    at Hook.eval (eval at create (/Users/***/Documents/projects/rspack-project/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:7:1)
    at Hook.CALL_DELEGATE [as _call] (/Users/***/Documents/projects/rspack-project/node_modules/tapable/lib/Hook.js:14:14)
    at Compiler._Compiler_newCompilation (/Users/***/Documents/projects/rspack-project/node_modules/@rspack/core/src/compiler.ts:358:30)
   0: _napi_register_module_v1
   1: <unknown>
   2: <unknown>
] {
  code: 'GenericFailure'
}

Tested too by creating a new app with npm create rspack@latest and get the same error when using the copy webpack plugin.

Btw, thank you for this great project!

[Feature Request]: plugin naming convention for rspack-specific plugins

What problem does this feature solve?

Note that it's more of a discussion than a feature request.

When I saw vue-rsloader, I know that this is a plugin migrated from vue-loader, and had some thoughts:

When a webpack loader or plugin cannot be used directly in Rspack, and we cannot also modify it directly, we must fork it and released a new NPM package, so we need a new name for it, If we don't make a naming convention, the final NPM name may have many styles, e.g. when the original name is foo-loader, the migrated would be:

  • foo-rsloader
  • foo-rspack-loader
  • rspack-foo-loader

What does the proposed API of configuration look like?

IMO I preferred rspack-foo-loader, but the final decision need discussion from the core team and we need document it.

[Tracking issue] improve migration guide

the migration guide is too simple to guide real world application migration, there're following things we can do to simplify the migration process

My tasks

Optimize the migration documentation

We need a document (or an index) to map the configuration differences between webpack and rspack, which will help developers migrate smoothly. (It may not be feasible to include every configuration, but the document should include most commonly used configurations.)

Some configurations that differ between the two need to be highlighted separately.
For example, with regards to the 'Externals' configuration, webpack supports multiple types, but rspack only supports Record<string, string>. This could leave the migration work unsure of how to proceed.

Some configuration documentations are too simple. I think it would be helpful to indicate what work is being done and what features will be supported in the future, such as cache.

Tracking docs

Home page

RoadMap

Guide

  • Guide @hardfist
    • Installation guide
    • First Bundle
    • Use config file
    • Npm scripts
    • Create from template
    • Create from modernjs
  • #4 @h-a-n-a
    • Builtin support
      • JavaScript/JSX
      • TypeScript/JSX
      • JSON
      • Asset Module
      • CSS Support
    • Extend via Plugin, loader
  • #5 @h-a-n-a
    • React
    • SolidJS
  • devServer @ahabhgk
    • HMR
    • Proxy
  • Optimization
  • #10
    • Loader API(link)
    • Tutorial
    • Bulitin loader
    • Loader compat(link)
  • #11
    • Plugin API(link)
    • Tutorial
    • Plugin compat(link)
  • Deploy @hardfist

Configuration

API

CLI @hardfist

  • CLI commands

Glossary

Architecture @hyf0 @h-a-n-a

Migrating

  • Migrate from webpack
  • Modern-js integration(link) @9aoy
  • Compat-page @ahabhgk
    • Loader
    • Plugin

Benchmark @IWANABETHATGUY @ahabhgk @chenjiahan

  • Dev
  • Build
  • HMR

Blog @hardfist

  • Release notes
  • Technical notes

Showcase(Example) @chenjiahan

  • Arco

Highlevel Review

English

  • Avoid subjective adjectives as much as possible. e.g. "famously", "steeper".
  • Avoid usage of "you" and "we". e.g. "we can tell Rspack", "If you wish to modify this behavior, you can use".

Chinese

  • Avoid the usage of "we"
  • Remove /change weird machine-translated jargons
  • Add english jargon after the Chinese jargons, for example: 代码分割 (Code Splitting)

--

Use case-police to check cases.

--

I think most people will start with the question: "Can I switch my build to rspack?" because people opening the docs are the people who already knew what webpack is.
This means the compact table and migration guide should be moved to the top, or they should be mentioned and link at the top of the introduction and github README.

[Feature Request]: Documentation for migrate from vite.

What problem does this feature solve?

As a developer working on a vite project, I am suffering from its slow build process. I understand Rspack is initially targeting folks who use Webpack. However, it would be best if there is a official documentation on guiding migrate vite project towards Rspack

What does the proposed API of configuration look like?

Documentation request, no API.

documenting `builtins.treeShaking`

It seems builtins.treeShaking is missing, although treeShaking has documented in Guide, but I think builtins.treeShaking is indispensable, because it indeed an option of builtins.

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.