Comments (3)
Ok, I found that I need to add solidOptions: { generate: "ssr", hydratable: true },
to build options to make it work in astro, however now it doesn't hydrate on the client. How to make it work?..
from rollup-preset-solid.
As I understood, I need to generate two outputs:
- for web (I guess, esm might be enough)
- for server with
solidOptions: { generate: "ssr", hydratable: true }
(esm, cjs) - Update
package.json
with
"exports: {
".": {
"node": "server path",
"browser": "browser path",
"import": "browser path",
"require": "server path"
// "solid": "???" - this line breaks everything
}
}"
So I needed smth like this:
withSolid([
{
input: "src/index.ts",
targets: ["esm"]
},
{
input: "src/index.ts",
targets: ["esm", "cjs"],
solidOptions: { generate: "ssr", hydratable: true }
},
])
How to get a good folder structure in this case? When I try to do this, it builds everything into dist/index without splitting to esm, cjs folders.
from rollup-preset-solid.
My issue was the pnpm-lock file.
from rollup-preset-solid.
Related Issues (11)
- Split dist/esm in multiple files HOT 2
- Does not handle imports with iife output format
- ES module load error HOT 1
- Export using `.cjs` / `.mjs` extensions HOT 1
- Not working with jsx import extensions
- Built files are broken when a function is used with generics HOT 1
- Better exports map HOT 3
- MIT license? HOT 2
- Override `input` and `output` HOT 2
- Waring for .js instead of .isx input
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 rollup-preset-solid.