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

peerDependency @swc/core isn't optional #36

Closed
JiPaix opened this issue Mar 19, 2022 · 2 comments
Closed

peerDependency @swc/core isn't optional #36

JiPaix opened this issue Mar 19, 2022 · 2 comments

Comments

@JiPaix
Copy link

JiPaix commented Mar 19, 2022

import { join } from 'path';
import { defineConfig } from 'vite';
import { VitePluginNode } from 'vite-plugin-node';

export default defineConfig({
  server: {
    port: 3000,
  },
   plugins: [
    ...VitePluginNode({
      adapter: 'express',
      appPath: './index.ts',
      exportName: 'viteNodeApp',
      tsCompiler: 'esbuild',
      swcOptions: {},
    }),
  ],
});
error during build:
Error: Cannot find module '@swc/core'

could you temporarily fix it by changing this line until it's fixed?

"optional": true

@RDIL
Copy link
Contributor

RDIL commented Apr 29, 2022

Well but it is optional... for instance if you don't use it, you shouldn't have to install it.

Edit: I suppose it should be in optionalDependencies too, that's my bad.

@axe-me
Copy link
Owner

axe-me commented May 11, 2022

fixed in 1.0.0 by lazy loading the module

@axe-me axe-me closed this as completed May 11, 2022
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