Ver Fonte

latest build imporovements

Adam Shaw há 5 anos atrás
pai
commit
6b18bb4dff

+ 12 - 6
package.json

@@ -24,12 +24,18 @@
     "url": "http://arshaw.com/"
   },
   "copyright": "2019 Adam Shaw",
-  "workspaces": [
-    "packages/*",
-    "packages-premium/*",
-    "packages-contrib/*",
-    "example-projects/*"
-  ],
+  "workspaces": {
+    "packages": [
+      "packages/*",
+      "packages-premium/*",
+      "packages-contrib/*",
+      "example-projects/*"
+    ],
+    "nohoist": [
+      "**/codelyzer",
+      "**/karma-sourcemap-loader"
+    ]
+  },
   "scripts": {
     "postinstall": "./scripts/postinstall.sh",
     "build": "gulp build",

+ 1 - 1
packages-contrib/angular

@@ -1 +1 @@
-Subproject commit f5feb52441077618a587d3065b6c3c4f8e855c35
+Subproject commit a060530bb370234a13fd6fd6f6443babb78b83cd

+ 1 - 1
packages-contrib/react

@@ -1 +1 @@
-Subproject commit fad23df8e4197657f3aca92bc5e672f12772cd4b
+Subproject commit 3ac5e0a8872f289043ff874073e6641c2b270ab3

+ 1 - 1
packages-contrib/vue

@@ -1 +1 @@
-Subproject commit 24aa0d80f87235572de3aa9f32d06037fad290c5
+Subproject commit b83a1595318c2d557816eb5a65f9c93eed3a6131

+ 1 - 1
scripts/lib/rollup-dts.js

@@ -40,7 +40,7 @@ module.exports = function() {
           // vdom is in a separate file.
           // also, (p)react gets imported because tsc traces ambient declaration to (p)react package. reference from vdom module.
           if (id.match(/vdom$/) || id.match(/^p?react$/)) {
-            return { id: './vdom', external: true }
+            return { id: './vdom', external: true, moduleSideEffects: true }
           }
 
           // sometimes tsc writes .d.ts files weird when there are implicit imports. imports from the publicly-named root of own package.

+ 9 - 5
scripts/lib/rollup-modules.js

@@ -31,22 +31,26 @@ module.exports = function(isDev) {
 
 function buildPkgConfig(pkgStruct, isDev) {
   let banner = renderBanner(pkgStruct.jsonObj)
+  let input = path.join('tmp/tsc-output', pkgStruct.srcDir, 'main.js')
 
   return {
-    input: path.join('tmp/tsc-output', pkgStruct.srcDir, 'main.js'),
+    input,
     output: {
       file: path.join(pkgStruct.dir, 'main.js'),
       format: 'esm',
       banner,
       sourcemap: isDev
     },
-    external(id) {
-      return isNamedPkg(id)
-    },
     plugins: [
       {
         resolveId(id, source) {
-          if (id.match(/vdom$/) && source.match('packages/core')) {
+          if (id === input) {
+            return null
+          }
+          else if (id.match(/vdom$/) && source.match('packages/core')) {
+            return { id, external: true, moduleSideEffects: true }
+          }
+          else if (isNamedPkg(id)) {
             return { id, external: true }
           }
         }

Diff do ficheiro suprimidas por serem muito extensas
+ 54 - 685
yarn.lock


Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff