Coder Social home page Coder Social logo

reconbot / arc-plugin-esbuild Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 2.0 2.65 MB

Bundles arc functions with esbuild, includes dependencies and tree shakes!

Home Page: https://www.npmjs.com/package/arc-plugin-esbuild

License: Apache License 2.0

JavaScript 9.77% TypeScript 87.54% Arc 2.44% CSS 0.25%
architect esbuild

arc-plugin-esbuild's People

Contributors

andybee avatar dependabot[bot] avatar filmaj avatar lpsinger avatar reconbot avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

arc-plugin-esbuild's Issues

Remix-Run arc sandbox watch does not detect changes

I'm using your plugin with Remix-run to achieve reasonably sized deployments to AWS Lambda. The 20MB zip bundle produced by arc deploy has dropped to 850KB after incorporating your plugin. This is great!

On the flip-side, arc sandbox doesn't seem to work unless I deploy first. (arc sandbox is not creating the Lambda's index.js while arc deploy does). I think this is because Remix-run establishes a non-arc-standard directory structure which is reasonably assumed in this plugin.

sandbox: {
async start({ arc, inventory }) {
if (!arc.esbuild) {
return
}
const { entryFilePattern, target, external } = getOptions(arc)
const projectDir = inventory.inv._project.src as string
const entryPattern = join(projectDir, 'src', '**', entryFilePattern)
const entryFiles = await glob(entryPattern, { ignore: ['./src/**/node_modules/**', './src/plugins/**'] })

This is my guess. I don't really know.

For reference, here is the directory structure that Remix-run is working with:

app/**/*.ts,*.tsx     // application code
public/**/*           // assets
server/index.ts       // `requires` the next file and wraps it with a lambda handler
server/build/index.js // dynamically built by Remix compilation, has separate watch

The output of this process is a single fat lambda built from server/index.ts. The deployable server/index.js is properly built on arc deploy but not arc sandbox.

Is there a way to configure the plugin that I don't see?

Thanks for your consideration.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/release.yml
  • actions/checkout v3
  • actions/setup-node v3.4.1
.github/workflows/test.yml
  • actions/checkout v3
  • actions/setup-node v3.4.1
  • actions/checkout v3
  • actions/setup-node v3.4.1
npm
package.json
  • @architect/utils ^3.1.2
  • fs-extra ^10.1.0
  • @architect/functions 5.2.3
  • @architect/inventory 4.0.5
  • @tsconfig/node14 14.1.2
  • @types/chai 4.3.16
  • @types/fs-extra 9.0.13
  • @types/mocha 10.0.6
  • @types/node 20.12.12
  • @typescript-eslint/eslint-plugin 5.62.0
  • @typescript-eslint/parser 5.62.0
  • chai 5.1.1
  • esbuild 0.15.18
  • esbuild-register 3.5.0
  • eslint 8.57.0
  • mocha 10.4.0
  • rollup 2.79.1
  • semantic-release 23.1.1
  • typescript 5.1.6
  • esbuild ^0.14.49 || ^0.15.0
  • node ^14.13 || >=16
sample-app/package.json
  • @architect/architect ^10.0.0
  • typescript 5.1.6
sample-app/src/http/get-hi/package.json
  • @architect/functions ^5.0.0
  • typescript 5.1.6
sample-app/src/http/get-index/package.json
  • @architect/functions ^5.0.0
  • typescript 5.1.6

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.