mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-30 02:19:52 +02:00
Improvements to developer experience with building packages (#1595)
* Improvements to developer experience with building packages * Add note to Contributing.md about watch:packages
This commit is contained in:
committed by
Ian Storm Taylor
parent
b98e675bfb
commit
b26bed1c88
@@ -115,6 +115,11 @@ export default (pkg) => {
|
||||
format: 'es',
|
||||
sourcemap: environment === 'development',
|
||||
},
|
||||
{
|
||||
file: `packages/${pkgName}/${output.cjs}`,
|
||||
format: 'cjs',
|
||||
exports: 'named',
|
||||
},
|
||||
],
|
||||
external: isExternalDependency,
|
||||
plugins: [
|
||||
@@ -146,14 +151,9 @@ export default (pkg) => {
|
||||
const configurations = [moduleConfig]
|
||||
|
||||
if (environment === 'production') {
|
||||
// In development, we only build the ES version to
|
||||
// In development, we only build the module version to
|
||||
// reduce rebuild times. In production, we add the
|
||||
// configs for the other variants here.
|
||||
moduleConfig.output.push({
|
||||
file: `packages/${pkgName}/${output.cjs}`,
|
||||
format: 'cjs',
|
||||
exports: 'named',
|
||||
})
|
||||
// configs for the UMD variants here.
|
||||
configurations.push(umdConfig, umdConfigMin)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user