Comparing version 3.2.2 to 3.2.3
Change Log | ||
========== | ||
### 3.2.3 | ||
- publicPath should be operate on relative `.` imports | ||
### 3.2.2 | ||
@@ -4,0 +7,0 @@ - publicPath option was not working correctly for complex relative imports |
{ | ||
"name": "jpex", | ||
"version": "3.2.2", | ||
"version": "3.2.3", | ||
"description": "Javascript Prototype Extension", | ||
@@ -5,0 +5,0 @@ "main": "dist/cjs/jpex.js", |
@@ -14,3 +14,4 @@ const { types: t } = require('@babel/core'); | ||
if (!cache[key]) { | ||
const value = `${state.publicPath || state.filename}/${state.typeName}`; | ||
const usePublicPath = state.publicPath && state.filename[0] === '.'; | ||
const value = `${usePublicPath ? state.publicPath : state.filename}/${state.typeName}`; | ||
cache[key] = value; | ||
@@ -27,3 +28,4 @@ } | ||
if (!cache[key]) { | ||
const value = `${state.publicPath || state.filename}/${state.typeName}`; | ||
const usePublicPath = state.publicPath && state.filename[0] === '.'; | ||
const value = `${usePublicPath ? state.publicPath : state.filename}/${state.typeName}`; | ||
cache[key] = value; | ||
@@ -44,3 +46,4 @@ } | ||
if (!cache[key]) { | ||
const value = state.publicPath ? `${state.publicPath}/${path.node.imported.name}` : key; | ||
const usePublicPath = state.publicPath && state.filename[0] === '.'; | ||
const value = usePublicPath ? `${state.publicPath}/${path.node.imported.name}` : key; | ||
cache[key] = value; | ||
@@ -47,0 +50,0 @@ } |
83869
1973