Skip to content

Vite config CORS problem #17

Description

@phederal

If I use CLI to create a project with --custom flag and selecting Vue I get VIte config without specifying CORS rules. I think you should add this to the config that is created with the project. Not just for Vue, but for the rest of the templates too.

export default defineConfig({
	server: {
		cors: {
			origin: '*',
		},
	},
	plugins: [
		vue({
			template: {
				transformAssetUrls: {
					base: null,
					includeAbsolute: false,
				},
			},
		}),
		leaf({
			input: ['app/views/css/app.css'],
			refresh: true,
		}),
	],
});

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions