Skip to content

Commit

Permalink
Roll up inline-style-prefixer (#364)
Browse files Browse the repository at this point in the history
Since v5 of inline-style-prefixer removed the dynamic generator, it only
works with static generator data. It seems unlikely that other
dependencies in an application will bring in inline-style-prefixer, so
we can likely reduce bundle size a little by rolling it up here.
  • Loading branch information
lencioni committed Apr 5, 2019
1 parent 833eec3 commit cf83722
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions rollup.config.js
Expand Up @@ -34,6 +34,7 @@ function distBuild(options) {
}

const externals = new Set(Object.keys(pkg.dependencies));
externals.delete('inline-style-prefixer');

function standardBuilds() {
return {
Expand All @@ -42,9 +43,6 @@ function standardBuilds() {
if (externals.has(id)) {
return true;
}

// Mark deep imports from inline-style-prefixer as external.
return /^inline-style-prefixer\//.test(id);
},
output: [
{ dir: 'lib', format: 'cjs' },
Expand All @@ -54,6 +52,9 @@ function standardBuilds() {
babel({
exclude: ['node_modules/**'],
}),
resolve({
browser: true,
}), // so rollup can find node modules
commonjs(), // so rollup can convert node modules to ESM if needed
],
};
Expand Down

0 comments on commit cf83722

Please sign in to comment.