@flareapp/flare-webpack-plugin-sourcemap
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -83,6 +83,2 @@ (function (factory) { | ||
var outputPath = compilation.getPath(compiler.outputPath, {}); | ||
// add trailing slash to outputPath | ||
if (outputPath.charAt(outputPath.length - 1) !== '/') { | ||
outputPath += '/'; | ||
} | ||
if (!chunks) { | ||
@@ -95,7 +91,6 @@ return []; | ||
if (filename && sourcemapUrl) { | ||
var sourcemapLocation = outputPath + util_1.removeQuery(sourcemapUrl); | ||
var sourcemapLocation = util_1.removeQuery(compiler.outputFileSystem.join(outputPath, sourcemapUrl)); | ||
try { | ||
var content = fs.readFileSync(sourcemapLocation, 'utf8'); | ||
sourcemaps = sourcemaps.concat([{ filename: util_1.removeQuery(filename), content: content }]); | ||
console.log(filename); | ||
} | ||
@@ -102,0 +97,0 @@ catch (error) { |
{ | ||
"name": "@flareapp/flare-webpack-plugin-sourcemap", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"main": "dist", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -108,9 +108,4 @@ import { Compiler, DefinePlugin, compilation } from 'webpack'; | ||
const compiler = compilation.compiler; | ||
let outputPath = compilation.getPath(compiler.outputPath, {}); | ||
const outputPath = compilation.getPath(compiler.outputPath, {}); | ||
// add trailing slash to outputPath | ||
if (outputPath.charAt(outputPath.length - 1) !== '/') { | ||
outputPath += '/'; | ||
} | ||
if (!chunks) { | ||
@@ -125,3 +120,3 @@ return []; | ||
if (filename && sourcemapUrl) { | ||
const sourcemapLocation = outputPath + removeQuery(sourcemapUrl); | ||
const sourcemapLocation = removeQuery(compiler.outputFileSystem.join(outputPath, sourcemapUrl)); | ||
@@ -128,0 +123,0 @@ try { |
16697
363