S
SolidJS15mo ago
PauL_1

HI guys I have a problem with with ssr on my lib. I use rollup

export default withSolid({
writePackageJson: true,
input: "./src/index.tsx",
targets: ["esm","cjs"],
plugins: [vanillaExtractPlugin(), resolve()],
output: {
dir: "dist",
format: "es",
preserveModules: true,
assetFileNames({name}) {
const path = name?.replace("src/styles", 'assets');
return path;
}
}
});
export default withSolid({
writePackageJson: true,
input: "./src/index.tsx",
targets: ["esm","cjs"],
plugins: [vanillaExtractPlugin(), resolve()],
output: {
dir: "dist",
format: "es",
preserveModules: true,
assetFileNames({name}) {
const path = name?.replace("src/styles", 'assets');
return path;
}
}
});
and this are my exports in package.json
"source": "./dist/source/index.jsx",
"main": "./dist/src/index.js",
"module": "./dist/esm/index.js",
"types": "./dist/types/index.ts",
"exports": {
".": {
"types": "./dist/types/index.d.ts",
"solid": "./dist/src/index.js",
"import": "./dist/esm/index.js",
"browser": "./dist/esm/index.js",
"require": "./dist/cjs/index.js",
"node": "./dist/cjs/index.js"
}
},
"files": [
"dist"
],
"source": "./dist/source/index.jsx",
"main": "./dist/src/index.js",
"module": "./dist/esm/index.js",
"types": "./dist/types/index.ts",
"exports": {
".": {
"types": "./dist/types/index.d.ts",
"solid": "./dist/src/index.js",
"import": "./dist/esm/index.js",
"browser": "./dist/esm/index.js",
"require": "./dist/cjs/index.js",
"node": "./dist/cjs/index.js"
}
},
"files": [
"dist"
],
does any has a clue why how I can fix the vite ssr error vite_ssr_import_0.template is not a function ?
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server