You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP

parcel-optimizer-custom-terser

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parcel-optimizer-custom-terser - npm Package Compare versions

Comparing version

to
1.0.2

@@ -28,5 +28,3 @@ import {Optimizer as $vvVPr$Optimizer} from "@parcel/plugin";

const result = await $vvVPr$minify(contents, minifyOptions);
// const result = await minify(contents as string, {sourceMap: true});
const rawMap = JSON.parse(result.map);
console.log('result.map', typeof result.map, result.map);
if (map) {

@@ -39,12 +37,2 @@ const vlq = map.toVLQ();

map.addVLQMap(vlq);
// let sourceMap;
// if (rawMap) {
// sourceMap = SourceMap.generateEmptyMap({
// projectRoot: vlq.sourceRoot!,
// sourceName: bundle.name,
// sourceContent: rawMap.sourcesContent?.join('\n') || ''
// });
// sourceMap.addNames(rawMap.names);
// sourceMap.
// }
}

@@ -51,0 +39,0 @@ return {

@@ -38,5 +38,3 @@ var $1dqRE$parcelplugin = require("@parcel/plugin");

const result = await $1dqRE$terser.minify(contents, minifyOptions);
// const result = await minify(contents as string, {sourceMap: true});
const rawMap = JSON.parse(result.map);
console.log('result.map', typeof result.map, result.map);
if (map) {

@@ -49,12 +47,2 @@ const vlq = map.toVLQ();

map.addVLQMap(vlq);
// let sourceMap;
// if (rawMap) {
// sourceMap = SourceMap.generateEmptyMap({
// projectRoot: vlq.sourceRoot!,
// sourceName: bundle.name,
// sourceContent: rawMap.sourcesContent?.join('\n') || ''
// });
// sourceMap.addNames(rawMap.names);
// sourceMap.
// }
}

@@ -61,0 +49,0 @@ return {

{
"name": "parcel-optimizer-custom-terser",
"version": "1.0.1",
"version": "1.0.2",
"source": "src/index.ts",

@@ -5,0 +5,0 @@ "module": "dist/index.es.js",

@@ -17,13 +17,2 @@ import {Optimizer} from '@parcel/plugin';

interface OptimizeArgs<ConfigType> {
bundle: NamedBundle;
bundleGraph: BundleGraph<NamedBundle>;
contents: Blob;
map: SourceMap | null | undefined;
options: PluginOptions;
logger: PluginLogger;
config: ConfigType;
getSourceMapReference: (map: SourceMap | null | undefined) => Async<string | null | undefined>;
}
export default new Optimizer({

@@ -74,1 +63,2 @@ async optimize(args): Promise<BundleResult> {

});
{
"extends": "../../configs/base.tsconfig.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "dist",
"baseUrl": "./"
"baseUrl": "./",
"target": "ESNext",
"allowJs": true,
"skipLibCheck": true,
"declaration": true,
"declarationMap": true,
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"downlevelIteration": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"resolveJsonModule": true,
"isolatedModules": false,
"noEmit": false,
"module": "esnext",
"moduleResolution": "node",
"strict": true,
"jsx": "react",
"lib": [
"dom",
"esnext"
],
"sourceMap": true
},

@@ -8,0 +31,0 @@ "include": [

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet