Skip to content

Commit

Permalink
fix: rollup plugin reads files outside it's cwd
Browse files Browse the repository at this point in the history
See rollup/rollup-pluginutils#39 for more background. Using a regex overrides the automatic scoping.
  • Loading branch information
tivac committed Aug 26, 2018
1 parent c6a4068 commit 31e58fa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/rollup/rollup.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/* eslint max-statements: [ 1, 20 ] */
/* eslint max-statements: [ "warn", 20 ] */
"use strict";

const fs = require("fs");
const path = require("path");

const { keyword } = require("esutils");

const utils = require("rollup-pluginutils");
const { createFilter } = require("rollup-pluginutils");

const Processor = require("modular-css-core");
const output = require("modular-css-core/lib/output.js");
Expand All @@ -31,12 +31,12 @@ module.exports = function(opts) {
const options = Object.assign(Object.create(null), {
common : "common.css",
json : false,
include : "**/*.css",
include : /\.css$/i,
namedExports : true,
styleExport : false,
}, opts);

const filter = utils.createFilter(options.include, options.exclude);
const filter = createFilter(options.include, options.exclude);

const { styleExport, done, map } = options;

Expand Down

0 comments on commit 31e58fa

Please sign in to comment.