Turbrorepo not working with a package built with webpack #1357
-
|
Hey everybody, I took the example design system repo and I added a new package to that instead of being build with tsup it was being built with webpack which can be seen here '@acme/test`. This is a small sample of a bigger project that needs to keep using webpack... I have a package.json in the acme-test folder that has this: "name": "@acme/test",
"version": "0.0.0",
"main": "./dist/index.js",
"scripts": {
"build": "webpack build --mode=production",
"dev": "webpack --mode=development --watch",
"lint": "TIMING=1 eslint src/**/*.ts* --fix",
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist"
},A sample of my webpack file looks like this: module.exports = {
entry: "./src/index.jsx",
target: "browserslist",
output: {
filename: "index.js",
path: resolve("dist"),
},
....My entry file export const P = ({ children }) => <p>{children}</p>;In the storybook package I am using it like so: When i run
Does anybody know if I am missing something? or configuring something wrong? It seems like it doesn't see any exports. I have also tried this with a Next.js example and ran into the same problems. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
same here. There is this workaround, by setting: It works properly in the mono-repo, I can't confirm if |
Beta Was this translation helpful? Give feedback.
same here.
Webpack seems to be lost with the linked packages inside
node_modules.There is this workaround, by setting:
It works properly in the mono-repo, I can't confirm if
yarn linkornpm linkare going to work after that tho.