Comments (2)
Why does the externals option not cover this? Can we re-use that option? I'd be happy to review & merge a PR.
from esbuild_deno_loader.
I ran into this issue today. Here's a small demonstration:
main.tsx
import React from "https://esm.sh/[email protected]?dev";
export default function App() {
return <h1>Hello, world!</h1>;
}
demo.ts
import * as esbuild from "https://deno.land/x/[email protected]/mod.js";
import { denoPlugin } from "https://deno.land/x/[email protected]/mod.ts";
const result = await esbuild.build({
plugins: [
// @ts-expect-error types don't agree for some unrelated reason
denoPlugin(),
],
entryPoints: ["main.tsx"],
outfile: "./dist/main.esm.js",
bundle: true,
format: "esm",
external: ["https://deno.land/*"],
});
console.log(result.outputFiles);
esbuild.stop();
dist/main.esm.js should result in being a small file with an import
statement for React but instead it bundles React.
from esbuild_deno_loader.
Related Issues (20)
- Renaming temp folder errors on Github Actions HOT 5
- [ERROR] Directory not empty (os error 39) on build in docker HOT 2
- imports map not working HOT 2
- [plugin deno-loader] Module not found - preact/hook HOT 1
- Using with Deno Deploy HOT 2
- Relative path are not loaded HOT 1
- Module parse failure make the file unwatchable
- Document minimum deno version this works with HOT 1
- npm deps, with dependencies on node libraries are not handled properly HOT 1
- importmap support local path HOT 3
- [ERROR] File name too long HOT 2
- Bug: Failing to treeshake dead imports of sub files that have node type imports in them HOT 2
- Error when importing JSR packages with jsr specifiers: "Importing a JSR package via an HTTPS URL is not implemented."
- Allow Remote Config File
- Top-level await is disallowed in service workers. HOT 2
- Could not resolve react in "@react-three/drei" using deno-loader
- Loader doesn't work with esbuild's stdio option HOT 3
- Preact support
- Unable to build with `npm:*` dependencies HOT 2
- Read permission is always required even with the portable loader
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 esbuild_deno_loader.