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

refused to execute in browser #360

Open
vipincodewave opened this issue Sep 26, 2023 · 3 comments
Open

refused to execute in browser #360

vipincodewave opened this issue Sep 26, 2023 · 3 comments

Comments

@vipincodewave
Copy link

Refused to execute script from 'http://localhost:3000/swagger-ui-bundle.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

@Falven
Copy link

Falven commented Oct 6, 2023

pnpm install -D swagger-ui-dist

import { copy } from 'esbuild-plugin-copy';

copy({
      assets: [
        {
          from: ['./node_modules/swagger-ui-dist/swagger-ui-bundle.js'],
          to: 'SwaggerUIBundle.js',
        },
        {
          from: ['./node_modules/swagger-ui-dist/swagger-ui-standalone-preset.js'],
          to: 'SwaggerUIStandalonePreset.js',
        },
      ],
    }),

@robertoDCJ
Copy link

but where do I put this?

@Falven
Copy link

Falven commented Jul 15, 2024

but where do I put this?

Your ESBuild script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants