esbuild-node-tsc icon indicating copy to clipboard operation
esbuild-node-tsc copied to clipboard

Ignores `--config` parameter

Open selfagency opened this issue 3 years ago • 3 comments

Here's my config

module.exports = {
  entryPoints: ['./lib/**/*.ts'],
  outDir: './dist',
  esbuild: {
    minify: false,
    target: 'es2015',
    plugins: [esbuildPluginTsc()],
  },
};

And here's the command telling me that it doesn't care that I've specified my own config and is doing its own thing instead

$ /project/node_modules/.bin/etsc --config etsc.config.js
Using default config
NestedError: Cannot glob `**,!**/*.{ts,js,tsx,jsx}`: ENOENT: no such file or directory, stat 'src'
    at /Users/daniel/code/ud/unstoppable-domains-website/node_modules/cpy/index.js:92:10

selfagency avatar Mar 23 '22 13:03 selfagency

I just noticed the same thing, and then debugged it and saw that if there's any error on your config it will disregard it and load the default one, so just try to check what's wrong with your config.. you could also console.log on config.ts line 25 and see what the error is

eliraz-refael avatar Mar 28 '22 13:03 eliraz-refael

@a7ul adding an output to the config error would be helpful for others to see why their config was not loaded

eliraz-refael avatar Mar 28 '22 13:03 eliraz-refael

Would you be able you help out and raise a pr for the same @eliraz-refael ?

a7ul avatar Mar 28 '22 13:03 a7ul