Giter Site home page Giter Site logo

website's Introduction

website's People

Contributors

0xflotus avatar 2nthony avatar abhiprasad avatar abnersajr avatar adithyaakrishna avatar ajjahn avatar ambientlighter avatar anthony-legay avatar atesgoral avatar austaras avatar ayc0 avatar baffinlee avatar chalkygames123 avatar chasenstark avatar chawyehsu avatar clouedoc avatar dependabot[bot] avatar duncanbeevers avatar exarus avatar ild0tt0re avatar kdy1 avatar kohver avatar leerob avatar mfeckie avatar renovate[bot] avatar shinyaigeek avatar sno2 avatar sukkaw avatar xnuk avatar xuqingkuang 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  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

website's Issues

Dark mode for logos?

The logos shown on SWC website does not follow dark mode as shown in the screenshot below:

Screenshot

Screen Shot 2021-09-08 at 6 14 03 PM

It would be good to add dark mode for logos as shown in the screenshot below:

Screenshot

Screen Shot 2021-09-08 at 6 32 00 PM

Error unknown field keepClassnames/keepFnames in swc config

Steps to reproduce

Create swc config file and set keepClassnames and keepFnames of mangle options as described in documentation.

Results

Expected

Flags should be applied, no errors in terminal

Actual

Flags are not applied error in the console

Module build failed (from ./node_modules/swc-loader/src/index.js):
Error: unknown field keepClassnames, expected one of props, topLevel, keepClassNames, keepFnNames, keepPrivateProps, ie8, safari10, reserved at line 1 column 750

Update 1

Repository with min code needed to reproduce

https://github.com/kaczor6418/swc-flags-typo

Results:

  • After running npm run build at master branch:
    image

  • After running npm run build at fixed-flags-names branch
    image

How Do I Migrate from Babel to swc??

@kdy1
Hello!
Recently I tried to use swc instead of babel and I found this page.
However I can't migrate from babel becase I could not find any npm packages which takes the place of babel-preset-env.
How do I migrate from babel to swc??

Dependency Dashboard

Feedback for “Compilation”

It would be helpful if the documentation for this page actually listed out what the valid options are. For example, the entry on jsc.target only shows you one valid option - es2016

Better disclaimer on "usage" mode

Hi,

Right now we have a disclaimer in the Supported browsers page https://swc.rs/docs/configuration/supported-browsers#mode which says "The usage mode is currently not as efficient as Babel, yet.".

It great that we have that disclaimer, but I don't really understand what the efficiency tradeoff is here - are we adding more polyfills vs babel? Or is there a risk of of under-polyfill with this option? It would be good to add this information here, so users can understand what they are missing out on with this option.

Any plan to support i18n?

I am introducing swc to my team

At present, I want to know whether the official documentation of swc intends to support multiple languages, such as Chinese

By the way, I think I have time and ability to provide a Chinese translation version of the website, And If the main site provides a multi-language framework, it may be more convenient for more multi-language support.

Anyhow, I would like to know about the plans of the core team.

Suggestion to apply community i18n based on SWR docs

The SWR website (vercel/swr-site) also uses Nextra to seve documentation for users and it accepts 18n translations from the community. It's possible to achieve it by only using default Nextra i18n configuration.

Is there plans to start accepting it?

I'm interested to contributing by translating docs to pt-BR. If it's necessary, I'm willing to prepare the field for community docs i18n.

@swc/jest: Config snippet does not pass TSC

The following config snippet from the docs does not pass TSC (after renaming the config file to .ts and adding type annotations):

module.exports = {
  transform: {
    "^.+\\.(t|j)sx?$": ["@swc/jest"],
  },
};

TSC:

TSError: ⨯ Unable to compile TypeScript:
jest.config.ts:14:3 - error TS2322: Type '[string]' is not assignable to type 'string | TransformerConfig'.
  Type '[string]' is not assignable to type 'string'.

'^.+\\.(t|j)sx?$': [ '@swc/jest' ],

I think it should be either @swc/jest as a plain string or [ '@swc/jest', {} ] with an empty record.

Incorrect @swc/jest description

From

To make your Jest tests run faster, you can swap out the default JavaScript-based runner (`ts-jest`) for a [drop-in Rust replacement](https://github.com/swc-project/jest) using SWC.
:

To make your Jest tests run faster, you can swap out the default JavaScript-based runner (ts-jest) for a drop-in Rust replacement using SWC.


The "default" Jest runner for TypeScript is actually1 Babel with @babel/preset-typescript.

Neither @swc/jest nor the Babel TypeScript setup support type-checking, whilst ts-jest does.

This makes @swc/jest a drop-in replacement for the actual default runner, but not for the one that is mentioned :)

Footnotes

  1. https://jestjs.io/docs/getting-started#using-typescript

SWC.rs does not load

Screenshot 2021-08-16 at 11 00 48 AM

SWC.rs site doesn't load for me. My network is fine, and all other websites are working fine.

Document Cache-Busting

I assume it's possible to use swc add content hashes to generated files and use these. I did not find any documentation though.

Update migrate from babel

Hey all, love the work that is being done by the swc project. Was looking over the Migrate from babel page and noticed that it is significantly behind on what stage plugins are at as compared to also what's included in swc. Is there any work going on behind the scenes to update the docs site? Or is this something that can be contributed

Validate Dom nesting warning in console

This warning appears in dev on the index route

Screenshot 2022-06-25 at 10 26 18

It's due to p tags not being wrapped in {} which means another p tag is appended to the first p tag

<div className="mx-auto max-w-full w-[880px] text-center px-4 my-10">
  <p className="text-lg mb-2 text-gray-600 md:!text-2xl">
    Rust-based platform for the Web
  </p>
</div>

vs

<div className="mx-auto max-w-full w-[880px] text-center px-4 my-10">
  {<p className="text-lg mb-2 text-gray-600 md:!text-2xl">
    Rust-based platform for the Web
  </p>}
</div>

I'll be opening a PR with a solution shortly, Hope that's okay.

`jsc.baseUrl` docs are confusing

The docs for the jsc.baseUrl setting are incredibly minimal -- merely a link to some typescript docs. Unfortunately Typescript's docs have changed since the link was created, and no longer offer an immediately useful explanation for what value should be used. The page in question no longer seems to exist, with users instead redirected to general background reading on module resolution.

Ideally the docs would be reasonable self-sufficient, at least providing a basic summary of what the config option does, even if they link out to other sources for background context.

Moved from swc-project/swc#8605.

Path aliases doesn't work

Having my .swcrc file written as follows:

{
  "$schema": "https://json.schemastore.org/swcrc",
  "sourceMaps": true,
  "module": {
    "type": "commonjs"
  },
  "jsc": {
    "target": "es2017",
    "parser": {
      "syntax": "typescript",
      "decorators": true,
      "dynamicImport": true
    },
    "transform": {
      "legacyDecorator": true,
      "decoratorMetadata": true
    },
    "keepClassNames": true,
    "baseUrl": "./src",
    "paths": {
        "shared/*": ["../../../shared/*"]
    },
  },
  "minify": false
}

And my tsconfig.json written as follows:

{
	"compilerOptions": {
		"outDir": "dist",
		"baseUrl": "src",
		"paths": {
			"shared/*": ["../../../shared/*"]
		},
		"sourceMap": true,
		"inlineSources": true,
		"target": "ES6"
	},
	"noImplicitAny": false,
	"strictNullChecks": false,
	"extends": "../../tsconfig.json"
}

When using tsc I'm receiving the right bundle with the shared directory bundled in the dist, but when using the swc build the dist directory doesn't contain the shared folder at all

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.