rollup-plugin-sass
Advanced tools
Comparing version 1.13.0 to 1.13.1
@@ -34,3 +34,2 @@ "use strict"; | ||
const pluginutils_1 = require("@rollup/pluginutils"); | ||
const style_1 = require("./style"); | ||
const utils_1 = require("./utils"); | ||
@@ -88,3 +87,5 @@ const MATCH_SASS_FILENAME_RE = /\.sass$/, MATCH_NODE_MODULE_RE = /^~([a-z0-9]|@).+/i, insertFnName = '___$insertStyle', getImporterList = (sassOptions) => { | ||
let defaultExport = `""`; | ||
let imports = ''; | ||
if (rollupOptions.insert) { | ||
imports = `import ${insertFnName} from '${__dirname}/insertStyle.js';\n`; | ||
defaultExport = `${insertFnName}(${out});`; | ||
@@ -95,3 +96,3 @@ } | ||
} | ||
return `export default ${defaultExport};\n${restExports}`; | ||
return `${imports}export default ${defaultExport};\n${restExports}`; | ||
}); | ||
@@ -110,7 +111,2 @@ }, defaultIncludes = ['**/*.sass', '**/*.scss'], defaultExcludes = 'node_modules/**'; | ||
name: 'rollup-plugin-sass', | ||
intro() { | ||
if (pluginOptions.insert) { | ||
return style_1.insertStyle.toString().replace(/insertStyle/, insertFnName); | ||
} | ||
}, | ||
transform(code, filePath) { | ||
@@ -117,0 +113,0 @@ if (!filter(filePath)) { |
{ | ||
"name": "rollup-plugin-sass", | ||
"version": "1.13.0", | ||
"version": "1.13.1", | ||
"description": "Rollup Sass files.", | ||
@@ -16,3 +16,3 @@ "main": "dist/index.js", | ||
"prepare": "npm run build && npm test", | ||
"build": "npm run build-downlevel-dts && tsc --project tsconfig.json", | ||
"build": "npm run build-downlevel-dts && tsc --project tsconfig.build.plugin.json && tsc --project tsconfig.build.insertStyle.json", | ||
"build-downlevel-dts": "node scripts/clean-and-run-downlevel-dts.js", | ||
@@ -58,3 +58,4 @@ "downlevel-dts": "downlevel-dts . ts3.5 [--to=3.5]", | ||
"ts-node/register" | ||
] | ||
], | ||
"snapshotDir": "./test/snapshots" | ||
}, | ||
@@ -61,0 +62,0 @@ "dependencies": { |
Sorry, the diff of this file is not supported yet
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
25751
250