swc-project / pkgs

node.js packages for SWC
62 stars 20 forks source link

pkg nx project, failed to get the node_modules path #36

Open wmvm0 opened 7 months ago

wmvm0 commented 7 months ago

execute npx spack error

Caused by:
    0: failed to analyze module
    1: failed to resolve fs from /Users/wmvm/code/me/wmvmjs/node_modules/log4js/lib/log4js.js
    2: failed to get the node_modules path] {
  code: 'GenericFailure'
}

the spack.config.js

const { config } = require("@swc/core/spack");

module.exports = config({
    entry: {
        web: __dirname + "/packages/common/src/index.ts",
    },
    output: {
        name: "index.js",
    },
    module: {},
});

I want pkg my nx project package to one js file。 how config