@polylith/builder 0.0.10 → 0.0.15

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 +28 -4
  2. package/package.json +7 -2
package/App.js CHANGED
@@ -1,10 +1,14 @@
1
+ import path from 'path';
2
+
1
3
  import * as rollup from 'rollup';
4
+ import babel from 'rollup-plugin-babel';
2
5
  import * as resolve from '@rollup/plugin-node-resolve';
3
6
  import commonjs from '@rollup/plugin-commonjs';
7
+ import jsx from 'rollup-plugin-jsx';
4
8
  import html from "rollup-plugin-html";
5
9
  import loadables from './plugin-loadables.js';
6
10
  import mainHTML from './plugin-main-html.js';
7
- import path from 'path';
11
+ import styles from "rollup-plugin-styles";
8
12
 
9
13
  export class App {
10
14
  /*
@@ -100,12 +104,31 @@ export class App {
100
104
  input : {
101
105
  input: input,
102
106
  plugins: [
107
+ babel({
108
+ babelrc: false,
109
+ exclude: 'node_modules/**',
110
+ presets: [
111
+ [
112
+ '@babel/preset-env',
113
+ {
114
+ corejs: 3,
115
+ modules: false,
116
+ useBuiltIns: 'usage',
117
+ targets: {
118
+ ie: '11',
119
+ },
120
+ },
121
+ ],
122
+ ],
123
+ }),
103
124
  resolve.nodeResolve(),
125
+ jsx( {factory: 'React.createElement'} ),
104
126
  commonjs(),
105
127
  loadables(this.loadables),
106
128
  html({
107
- include: "**/*.html",
108
- }),
129
+ include: path.join(this.basePath, "**/*.html"),
130
+ }),
131
+ styles(),
109
132
  mainHTML({
110
133
  template: this.htmlTemplate.template,
111
134
  target: this.htmlTemplate.target,
@@ -118,7 +141,8 @@ export class App {
118
141
  sourcemap: true,
119
142
  dir : this.destination,
120
143
  format: 'es',
121
- }
144
+ },
145
+ assetFileNames: "[name]-[hash][extname]",
122
146
  }
123
147
  };
124
148
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polylith/builder",
3
- "version": "0.0.10",
3
+ "version": "0.0.15",
4
4
  "description": "The polylith builder",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -14,7 +14,12 @@
14
14
  "@rollup/plugin-node-resolve": "^13.0.5",
15
15
  "escape-string-regexp": "^5.0.0",
16
16
  "fs-extra": "^10.0.0",
17
+ "less": "^4.1.2",
17
18
  "rollup": "^2.58.0",
18
- "rollup-plugin-html": "^0.2.1"
19
+ "rollup-plugin-babel": "^4.4.0",
20
+ "rollup-plugin-html": "^0.2.1",
21
+ "rollup-plugin-jsx": "^1.0.3",
22
+ "rollup-plugin-styles": "^3.14.1",
23
+ "sass": "^1.43.4"
19
24
  }
20
25
  }