swc-project / pkgs

node.js packages for SWC
49 stars 15 forks source link

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

Open wmvm0 opened 5 months ago

wmvm0 commented 5 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