@polylith/builder 0.2.20 → 0.2.21
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/App.js +5 -2
- package/package.json +3 -2
package/App.js
CHANGED
|
@@ -19,7 +19,7 @@ import resources from "./plugin-copy-resources.js";
|
|
|
19
19
|
import jsconfig from "./plugin-jsconfig.js";
|
|
20
20
|
import loadConfigs from "./plugin-config.js";
|
|
21
21
|
import watchLog from "./plugin-watch.js";
|
|
22
|
-
|
|
22
|
+
import { terser } from "rollup-plugin-terser";
|
|
23
23
|
import {forceToPosix, fileExists} from './utils.js'
|
|
24
24
|
import ConfigFeature from './ConfigFeature.js';
|
|
25
25
|
import Files from './Files.js';
|
|
@@ -590,7 +590,7 @@ export default class App {
|
|
|
590
590
|
await this.findMainCss();
|
|
591
591
|
|
|
592
592
|
this.cssFiles.forEach(function(uri) {
|
|
593
|
-
cssTags += ` <link rel="stylesheet" href="${uri}"></link
|
|
593
|
+
cssTags += ` <link rel="stylesheet" href="${uri}"></link>\n`
|
|
594
594
|
}, this);
|
|
595
595
|
|
|
596
596
|
return cssTags;
|
|
@@ -686,6 +686,7 @@ export default class App {
|
|
|
686
686
|
|
|
687
687
|
async generateBuildConfiguration() {
|
|
688
688
|
var input = [this.fullIndexPath];
|
|
689
|
+
var env = process.env.NODE_ENV || 'dev';
|
|
689
690
|
|
|
690
691
|
// using a for loop because we are making an async call
|
|
691
692
|
for (let loadable of this.loadables) {
|
|
@@ -733,6 +734,8 @@ export default class App {
|
|
|
733
734
|
watchLog(),
|
|
734
735
|
];
|
|
735
736
|
|
|
737
|
+
if (env !== 'dev') plugins.push(terser());
|
|
738
|
+
|
|
736
739
|
if (this.liveReload) {
|
|
737
740
|
let plugin;
|
|
738
741
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@polylith/builder",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.21",
|
|
4
4
|
"description": "The polylith builder",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"@babel/preset-env": "^7.16.11",
|
|
20
20
|
"@babel/preset-react": "^7.16.7",
|
|
21
21
|
"@ondohers/console-colors": "^0.1.1",
|
|
22
|
-
"@polylith/core": "^0.1.9",
|
|
23
22
|
"@polylith/config-store": "0.1.2",
|
|
23
|
+
"@polylith/core": "^0.1.9",
|
|
24
24
|
"@rollup/plugin-babel": "^5.3.0",
|
|
25
25
|
"@rollup/plugin-commonjs": "^24.0.0",
|
|
26
26
|
"@rollup/plugin-json": "^5.0.2",
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"rollup-plugin-livereload": "^2.0.5",
|
|
39
39
|
"rollup-plugin-polyfill-node": "^0.11.0",
|
|
40
40
|
"rollup-plugin-styles": "^4.0.0",
|
|
41
|
+
"rollup-plugin-terser": "^7.0.2",
|
|
41
42
|
"sass": "^1.43.4"
|
|
42
43
|
}
|
|
43
44
|
}
|