Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: [1.0.0.alpha] triple slash in local server url #2784

Closed
abenhamdine opened this issue Jul 3, 2024 · 0 comments · Fixed by #2788
Closed

[Bug]: [1.0.0.alpha] triple slash in local server url #2784

abenhamdine opened this issue Jul 3, 2024 · 0 comments · Fixed by #2788
Assignees
Labels
🐞 bug Something isn't working

Comments

@abenhamdine
Copy link

abenhamdine commented Jul 3, 2024

Version

System:
    OS: Windows 11 10.0.22631
    CPU: (16) x64 AMD Ryzen 7 5800H with Radeon Graphics
    Memory: 4.76 GB / 15.36 GB
  Browsers:
    Edge: Chromium (123.0.2420.65)
  npmPackages:
    @rsbuild/core: 1.0.0-alpha.2 => 1.0.0-alpha.2
    @rsbuild/plugin-eslint: 1.0.0-alpha.2 => 1.0.0-alpha.2
    @rsbuild/plugin-react: 1.0.0-alpha.2 => 1.0.0-alpha.2
    @rsbuild/plugin-type-check: 1.0.0-alpha.2 => 1.0.0-alpha.2

Details

since alpha version, the local server url ends with a triple slash :

in the console :

image

in the browser :

image

config :

export default defineConfig({
  server: {
    port: 3001,
  },
  html: {
    title: "Application paie",
  },
  environments: {
    web: {
      source: {
        entry: {
          index: './src/index.tsx',
        },
      },
      output: {
        distPath: {
          root: 'build'
        },
        cleanDistPath: true,
        target: 'web',
      },
    },
  },
  plugins: [
    /** désactivé car prend trop de mémoire, souvent OOM */
    pluginTypeCheck({ enable: false }),
    /** désactivé car prend presque 30s lors du build */
    pluginEslint({ enable: false }),
    pluginReact()
  ],
  tools: {
    rspack(config, { appendPlugins }) {
      // Only register the plugin when RSDOCTOR is true, as the plugin will increase the build time.
      if (shouldUseRsdoctor) {
        appendPlugins(
          new RsdoctorRspackPlugin({
            // voir https://rsdoctor.dev/guide/usage/rule-config pour la configuration des règles
            linter: {
              //  When set to `'Error'`, all rules will be executed
              level: 'Error',
              extends: [],
              rules: {
                'default-import-check': 'on',
                'duplicate-package': 'on',
                'loader-performance-optimization': 'on',
                // par défaut, c'est ES5, ce qui est trop bas pour notre app
                // et on ne peut changer que pour ES6 (trop bas aussi) ou ES7+ (tout ce qui ES7 ou plus) donc aucun intéret à garder la règle
                'ecma-version-check': "off",
              },
            },
          })
        )
      }
      config.experiments = {
        ...(config.experiments ?? {}),
        // https://www.rspack.dev/config/experiments#experimentslazycompilation
        // désactivé car ne semble pas fonctionner correctement
        lazyCompilation: false
      }
      return config
    }
  }
})

Reproduce link

Sorry I don't know how to provide a production in codepen

Reproduce Steps

yarn run dev

see dev url

@abenhamdine abenhamdine added the 🐞 bug Something isn't working label Jul 3, 2024
@abenhamdine abenhamdine changed the title [Bug]: triple slash in local server url [Bug]: [1.0.0.alpha] triple slash in local server url Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants