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

Entry point cannot be marked as external when making node_modules external for node, on Windows. #1096

Open
fenilli opened this issue Mar 15, 2024 · 0 comments

Comments

@fenilli
Copy link

fenilli commented Mar 15, 2024

When I run build I get "The entry point cannot be marked as external" with this being the resolver plugin, only on windows machines, it works fine for wsl and posix.

      {
        name: 'make-all-packages-external',
        setup(build) {
          // iife files should be fully bundled.
          if (build.initialOptions.outExtension?.['.js'].startsWith('.iife.js')) {
            const filter = /^vue$/
            build.onResolve({ filter }, () => {
              return {
                path: 'Vue',
                external: true,
              }
            })
          } else {
            // It fails here!
            const filter = /^[^.\/]|^\.[^.\/]|^\.\.[^\/]/ // Must not start with "/" or "./" or "../"
            build.onResolve({ filter }, args => ({ path: args.path, external: true }))
          }
        },
      },

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar
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

1 participant