rollup-plugin-vue
Advanced tools
Comparing version 6.0.0-alpha.8 to 6.0.0-alpha.9
@@ -19,3 +19,2 @@ "use strict"; | ||
const rollup_pluginutils_1 = require("rollup-pluginutils"); | ||
const sourcemap_codec_1 = require("sourcemap-codec"); | ||
const debug = debug_1.default('rollup-plugin-vue'); | ||
@@ -61,21 +60,6 @@ const defaultOptions = { | ||
if (block) { | ||
const result = { | ||
return { | ||
code: block.content, | ||
map: normalizeSourceMap(block.map), | ||
}; | ||
if (query.type === 'template') { | ||
// generate source mapping for each character. | ||
result.map.mappings = sourcemap_codec_1.encode(result.code.split(/\r?\n/).map((line, index) => { | ||
const segments = []; | ||
for (let i = 0; i < line.length; ++i) { | ||
segments.push([i, 0, block.loc.start.line + index - 1, i]); | ||
} | ||
return segments; | ||
})); | ||
} | ||
debug(`load(${id})`, '\n' + | ||
result.code + | ||
'\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,' + | ||
Buffer.from(JSON.stringify(result.map), 'utf-8').toString('base64')); | ||
return result; | ||
} | ||
@@ -146,3 +130,6 @@ } | ||
if (query.module) { | ||
return `export default ${_(result.modules)}`; | ||
return { | ||
code: `export default ${_(result.modules)}`, | ||
map: null, | ||
}; | ||
} | ||
@@ -347,8 +334,4 @@ else { | ||
return { | ||
...map, | ||
version: Number(map.version), | ||
file: map.file, | ||
names: map.names, | ||
sources: map.sources, | ||
sourceRoot: map.sourceRoot, | ||
sourcesContent: map.sourcesContent, | ||
mappings: typeof map.mappings === 'string' ? map.mappings : '', | ||
@@ -355,0 +338,0 @@ }; |
{ | ||
"name": "rollup-plugin-vue", | ||
"version": "6.0.0-alpha.8", | ||
"version": "6.0.0-alpha.9", | ||
"license": "MIT", | ||
@@ -19,4 +19,3 @@ "main": "dist/index.js", | ||
"hash-sum": "^2.0.0", | ||
"rollup-pluginutils": "^2.8.2", | ||
"sourcemap-codec": "^1.4.8" | ||
"rollup-pluginutils": "^2.8.2" | ||
}, | ||
@@ -23,0 +22,0 @@ "peerDependencies": { |
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
4
17624
368
- Removedsourcemap-codec@^1.4.8
- Removedsourcemap-codec@1.4.8(transitive)