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

An error will occur in "library mode" #121

Open
4tj opened this issue Dec 30, 2024 · 2 comments
Open

An error will occur in "library mode" #121

4tj opened this issue Dec 30, 2024 · 2 comments

Comments

@4tj
Copy link

4tj commented Dec 30, 2024

When I use "library mode" to package, an error occurs:

error during build:
Invalid value for option "output.manualChunks" - this option is not supported for "output.inlineDynamicImports".

vite.config.ts:

const minimizeObfuscatorConfig = {
  autoExcludeNodeModules: true,
  threadPool: true,
};

export default {
  build: {
    lib: {
      entry: "src/lib/mylib.ts",
      name: "MyLib",
      fileName: "my-lib",
    },
  },
  plugins: [vitePluginBundleObfuscator(minimizeObfuscatorConfig)],
} satisfies UserConfig;
@z0ffy
Copy link
Owner

z0ffy commented Dec 30, 2024

When I use "library mode" to package, an error occurs:

error during build:
Invalid value for option "output.manualChunks" - this option is not supported for "output.inlineDynamicImports".

vite.config.ts:

const minimizeObfuscatorConfig = {
  autoExcludeNodeModules: true,
  threadPool: true,
};

export default {
  build: {
    lib: {
      entry: "src/lib/mylib.ts",
      name: "MyLib",
      fileName: "my-lib",
    },
  },
  plugins: [vitePluginBundleObfuscator(minimizeObfuscatorConfig)],
} satisfies UserConfig;

I have received the feedback and will reply as soon as possible.

@z0ffy
Copy link
Owner

z0ffy commented Dec 31, 2024

Setting autoExcludeNodeModules to false can resolve the error, but obfuscation will not be performed. I will need some time to handle this.

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

2 participants