Comments (5)
I would also appreciate this, unless there is another way to ignore modules similar to webpacks ignorePlugin
from serverless-esbuild.
@justin-prather I might be mistaken, but isn't the exclude
option used for exactly that ?
from serverless-esbuild.
@olup yes and no
From my understanding, you can exclude individual files using the serverless.yml exclude section. In my case though, what's happening is that the build is failing on an optional dependency of one of my project's dependencies. specifically pg-native. A package called slonik tries to use pg-native and if it is not available falls back to the pg module. the way i got around this with webpack was
plugins: [
new IgnorePlugin({
resourceRegExp: /^pg-native$/,
}),
],
there is an equivalent for esbuild but it doesn't appear on the surface at least to be usable with serverless-esbuild
from serverless-esbuild.
Hey @thomaschaaf, unfortunately, I cannot reproduce the build error with slonik
, or it is a runtime issue?
maybe it's possible to use exclude
option in pair with inject. According to the inject
doc you could make desired behavior for global vars. Would be good If you could make a minimal reproducible example to understand the issue. Anyway plugin support is a nice to have feature imo. thank you
from serverless-esbuild.
@floydspace looks like my issue was bubbling up from npm. Even though I'm not installing pg-native, it was still looking for the libpq dependency. Would still be nice to be able to just ignore that pattern and not have to install libpq
from serverless-esbuild.
Related Issues (20)
- serverless website documentation is outdated HOT 1
- Bun support HOT 1
- Unable to serverless package when no lambdas exist HOT 3
- serverless deploy fails without a reason when using esbuild-plugin-tsc HOT 2
- Rewrite Module Packaging Logic HOT 3
- I'm not sure if it supports layers
- pnpm: external modules bundled without their nested modules. HOT 2
- Indirect dependency marked as external missing in package HOT 1
- Slow performance when using external property
- Esbuild cannot rebuild error
- `patterns` not respected at `invoke local`
- sls package fails with individually: true for specific function Error: ENOENT: no such file or directory, copyfile
- update esbuild peerDependency HOT 1
- Support ESBuild 0.20.0 HOT 2
- watch function work with serverless-localstack.
- Possible memory-use regression in v1.48.1 HOT 1
- Stuck on Need a faster logging experience when using serverless-stack with serverless-esbuild HOT 1
- Support Lambda custom runtimes HOT 2
- Trouble importing to esbuild.config.js from an internal monorepo package HOT 1
- Hangs indefinitely on esbuild error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from serverless-esbuild.