@jspsych/config 1.3.1 → 1.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @jspsych/config
2
2
 
3
+ ## 1.3.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`e3e9d903`](https://github.com/jspsych/jsPsych/commit/e3e9d903462663b694633cdf873accefda453961) Thanks [@bjoluc](https://github.com/bjoluc)! - Prevent rollup from relying on node internals in browser builds
8
+
3
9
  ## 1.3.1
4
10
 
5
11
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jspsych/config",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "description": "Shared (build) configuration for jsPsych packages",
5
5
  "type": "module",
6
6
  "exports": {
package/rollup.js CHANGED
@@ -13,7 +13,7 @@ const makeConfig = ({
13
13
  outputOptions = {},
14
14
  globalOptions = {},
15
15
  iifeOutputOptions = {},
16
- nodeOnly = false,
16
+ isNodeOnlyBuild = false,
17
17
  }) => {
18
18
  const source = "src/index";
19
19
  const destination = "dist/index";
@@ -26,7 +26,7 @@ const makeConfig = ({
26
26
  const commonConfig = defineConfig({
27
27
  input: `${source}.ts`,
28
28
  plugins: [
29
- resolve(),
29
+ resolve({ preferBuiltins: isNodeOnlyBuild }),
30
30
  typescript({
31
31
  typescript: ts,
32
32
  tsconfigDefaults: {
@@ -62,7 +62,7 @@ const makeConfig = ({
62
62
  },
63
63
  ];
64
64
 
65
- if (!nodeOnly) {
65
+ if (!isNodeOnlyBuild) {
66
66
  output.push({
67
67
  // Build file to be used for tinkering in modern browsers
68
68
  file: `${destination}.browser.js`,
@@ -75,7 +75,7 @@ const makeConfig = ({
75
75
  // Non-babel builds
76
76
  const config = defineConfig([{ ...commonConfig, output }]);
77
77
 
78
- if (!nodeOnly) {
78
+ if (!isNodeOnlyBuild) {
79
79
  // Babel build
80
80
  config.push({
81
81
  ...commonConfig,