@flareapp/flare-webpack-plugin-sourcemap
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -83,2 +83,6 @@ (function (factory) { | ||
var outputPath = compilation.getPath(compiler.outputPath, {}); | ||
// add trailing slash to outputPath | ||
if (outputPath.charAt(outputPath.length - 1) !== '/') { | ||
outputPath += '/'; | ||
} | ||
if (!chunks) { | ||
@@ -88,2 +92,3 @@ return []; | ||
return chunks.reduce(function (sourcemaps, currentChunk) { | ||
console.log(currentChunk); | ||
var filename = currentChunk.files.find(function (file) { return /\.js$/.test(file); }); | ||
@@ -93,7 +98,6 @@ var sourcemapUrl = currentChunk.files.find(function (file) { return /\.js\.map$/.test(file); }); | ||
var sourcemapLocation = outputPath + util_1.removeQuery(sourcemapUrl); | ||
/* const content = compilation.assets[sourcemapUrl].source(); */ | ||
try { | ||
var content = fs.readFileSync(sourcemapLocation, 'utf8'); | ||
sourcemaps = sourcemaps.concat([{ filename: util_1.removeQuery(filename), content: content }]); | ||
console.log(content); | ||
console.log('kek:', filename, sourcemapLocation); | ||
} | ||
@@ -100,0 +104,0 @@ catch (error) { |
{ | ||
"name": "@flareapp/flare-webpack-plugin-sourcemap", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"main": "dist", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -108,4 +108,9 @@ import { Compiler, DefinePlugin, compilation } from 'webpack'; | ||
const compiler = compilation.compiler; | ||
const outputPath = compilation.getPath(compiler.outputPath, {}); | ||
let outputPath = compilation.getPath(compiler.outputPath, {}); | ||
// add trailing slash to outputPath | ||
if (outputPath.charAt(outputPath.length - 1) !== '/') { | ||
outputPath += '/'; | ||
} | ||
if (!chunks) { | ||
@@ -112,0 +117,0 @@ return []; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17065
373