@polylith/builder 0.1.7 → 0.1.8

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 CHANGED
@@ -537,6 +537,7 @@ export default class App {
537
537
  this.templateVariables['codeVariables'] = codeVariables;
538
538
 
539
539
  var plugins = [
540
+ jsconfig(this.root),
540
541
  resolve.nodeResolve({
541
542
  extensions: ['.js', '.jsx']
542
543
  }),
@@ -548,7 +549,6 @@ export default class App {
548
549
  loadConfigs(this.configs),
549
550
  loader(this.loadables),
550
551
  features(this.featureIndexes),
551
- jsconfig(this.root),
552
552
  html({
553
553
  include: path.join(this.sourcePath, "**/*.html"),
554
554
  }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polylith/builder",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "The polylith builder",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -61,6 +61,10 @@ async function findPathMatch(base, source, paths) {
61
61
  }
62
62
 
63
63
 
64
+ function isRelative(name) {
65
+ return name.slice(0, 2) === './' || name.slice(0, 3) === '../';
66
+ }
67
+
64
68
  export default function jsconfig(root) {
65
69
  var jsConfig;
66
70
  var basePath;
@@ -99,6 +103,8 @@ export default function jsconfig(root) {
99
103
  if (jsConfig === undefined) await readJsConfig();
100
104
  if (!jsConfig) return null;
101
105
 
106
+ if (isRelative(source)) return null;
107
+
102
108
  if (basePath) {
103
109
  var tryName = path.join(root, basePath, source);
104
110
  if (await fileExists(tryName)) {
@@ -106,6 +112,9 @@ export default function jsconfig(root) {
106
112
  return tryName;
107
113
  }
108
114
  }
115
+
116
+ if (source[0] === '/') return null;
117
+
109
118
  if (paths) {
110
119
  if (source.indexOf(root) === 0) return null;
111
120