Skip to content

Commit f3b8dda

Browse files
authored
Bug: Lib babel output is CommonJS (#1251)
Fixes #1250
1 parent 6b75e81 commit f3b8dda

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

.changeset/many-bobcats-brush.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'spectacle': patch
3+
---
4+
5+
Fix lib babel output to correctly produce CommonJS and not ESM (see #1250).

package-scripts.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ module.exports = {
2525
'babel:pkg:lib:esm':
2626
'cross-env BABEL_ENV=es nps "babel:pkg:base src --out-dir es"',
2727
'babel:pkg:lib:cjs':
28-
'cross-env BABEL_ENV=commonjs nps "babel:pkg:base src --out-dir lib"',
28+
'cross-env BABEL_ENV=cjs nps "babel:pkg:base src --out-dir lib"',
2929

3030
// - Webpack
3131
webpack: 'webpack',

packages/spectacle/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@
9898
"files": [
9999
"src/**",
100100
"!src/**/*.test.*",
101+
"../../package-scripts.js",
101102
"../../.babelrc.js",
102103
"../../.babelrc.build.js"
103104
],
@@ -113,6 +114,7 @@
113114
"files": [
114115
"src/**",
115116
"!src/**/*.test.*",
117+
"../../package-scripts.js",
116118
"../../.babelrc.js",
117119
"../../.babelrc.build.js"
118120
],

0 commit comments

Comments
 (0)