@polylith/builder 0.1.8 → 0.1.11

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.
Files changed (2) hide show
  1. package/App.js +10 -1
  2. package/package.json +3 -1
package/App.js CHANGED
@@ -5,9 +5,13 @@ import * as rollup from 'rollup';
5
5
  import { babel } from '@rollup/plugin-babel';
6
6
  import * as resolve from '@rollup/plugin-node-resolve';
7
7
  import commonjs from '@rollup/plugin-commonjs';
8
+ import rollupJson from "@rollup/plugin-json"
9
+
8
10
  import html from 'rollup-plugin-html';
9
11
  import livereload from 'rollup-plugin-livereload';
10
12
  import styles from "rollup-plugin-styles";
13
+ import builtins from 'rollup-plugin-node-builtins';
14
+ import globals from 'rollup-plugin-node-globals';
11
15
 
12
16
  import loader from './plugin-loader.js';
13
17
  import mainHTML from './plugin-main-html.js';
@@ -537,11 +541,16 @@ export default class App {
537
541
  this.templateVariables['codeVariables'] = codeVariables;
538
542
 
539
543
  var plugins = [
540
- jsconfig(this.root),
541
544
  resolve.nodeResolve({
545
+ preferBuiltins: true,
546
+ browser: true,
542
547
  extensions: ['.js', '.jsx']
543
548
  }),
544
549
  commonjs(),
550
+ globals(),
551
+ builtins(),
552
+ rollupJson(),
553
+ jsconfig(this.root),
545
554
  babel({
546
555
  presets: ['@babel/preset-react'],
547
556
  babelHelpers: 'bundled',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polylith/builder",
3
- "version": "0.1.8",
3
+ "version": "0.1.11",
4
4
  "description": "The polylith builder",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -25,6 +25,8 @@
25
25
  "rollup-plugin-html": "^0.2.1",
26
26
  "rollup-plugin-jsx": "^1.0.3",
27
27
  "rollup-plugin-livereload": "^2.0.5",
28
+ "rollup-plugin-node-builtins": "^2.1.2",
29
+ "rollup-plugin-node-globals": "^1.4.0",
28
30
  "rollup-plugin-styles": "^4.0.0",
29
31
  "sass": "^1.43.4"
30
32
  }