-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: compile and bundle monorepo using preconstruct cli #1871
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module.exports = { | ||
presets: ['@commercetools-frontend/babel-preset-mc-app'], | ||
plugins: [ | ||
'babel-plugin-import-graphql', | ||
'babel-plugin-typescript-to-proptypes', | ||
], | ||
}; |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,31 +15,25 @@ | |
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"main": "./dist/application-shell-connectors.cjs.js", | ||
"module": "./dist/application-shell-connectors.es.js", | ||
"typings": "./dist/typings/index.d.ts", | ||
"types": "./dist/typings/index.d.ts", | ||
"main": "dist/commercetools-frontend-application-shell-connectors.cjs.js", | ||
"module": "dist/commercetools-frontend-application-shell-connectors.esm.js", | ||
"files": ["dist", "test-utils", "package.json", "LICENSE", "README.md"], | ||
"preconstruct": { | ||
"entrypoints": ["./index.ts", "./test-utils/index.ts"] | ||
}, | ||
Comment on lines
+21
to
+23
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @adnasa FYI: this is how you would define multiple entrypoints. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. looks nice 🤩 |
||
"scripts": { | ||
"prepare": "./../../scripts/version.js replace", | ||
"prebuild": "rimraf dist/** test-utils/**", | ||
"build": "yarn build:bundles && yarn build:test-utils && yarn build:typings", | ||
"build:bundles": "cross-env NODE_ENV=production rollup -c ../../rollup.config.js -i ./src/index.ts", | ||
"build:bundles:watch": "yarn build:bundles -w", | ||
"build:test-utils": "cross-env NODE_ENV=development rollup -c ../../rollup.config.js -i ./src/test-utils/index.ts", | ||
"build:typings": "cross-env tsc -p tsconfig.declarations.json --emitDeclarationOnly --declarationDir dist/typings", | ||
"postbuild:typings": "echo \"export * from '../dist/typings/test-utils';\" > test-utils/index.d.ts" | ||
"prepare": "./../../scripts/version.js replace" | ||
}, | ||
"dependencies": { | ||
"@babel/runtime": "7.12.5", | ||
"@babel/runtime-corejs3": "7.12.5", | ||
"@commercetools-frontend/constants": "17.3.0", | ||
"@commercetools-frontend/sentry": "17.4.1", | ||
"@emotion/react": "11.1.1", | ||
"@types/lodash": "^4.14.155", | ||
"@types/prop-types": "^15.7.3", | ||
"graphql": "14.7.0", | ||
"lodash": "4.17.20", | ||
"lodash-es": "4.17.15", | ||
"moment-timezone": "^0.5.26", | ||
"prop-types": "15.7.2" | ||
}, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"main": "dist/commercetools-frontend-application-shell-connectors-test-utils.cjs.js", | ||
"module": "dist/commercetools-frontend-application-shell-connectors-test-utils.esm.js" | ||
} | ||
Comment on lines
+1
to
+4
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @adnasa ...and here. |
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could also specify
packages/*
and!packages/foo
to have exclusion. At least that's what I did in the flopper.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes but there are several packages to exclude. For now I think being explicit is better