From 756bc56b45eddb8a4e6eefc711302a3ab4e533cb Mon Sep 17 00:00:00 2001 From: Evan Jacobs Date: Mon, 12 Nov 2018 00:29:22 -0600 Subject: [PATCH] make the standalone build umd-compliant fixes #2191 --- CHANGELOG.md | 3 ++- rollup.config.js | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3713e612..6692fc87 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,6 @@ _The format is based on [Keep a Changelog](http://keepachangelog.com/) and this ## Unreleased - Performance optimization for fully static (no function interpolation) styled-components by avoiding using `ThemeConsumer` since it isn't necessary, by [@mxstbr](https://github.com/mxstbr) (see [#2166](https://github.com/styled-components/styled-components/pull/2166)) -- Allow disabling "speedy" mode via global `SC_DISABLE_SPEEDY` variable, by [@devrelm](https://github.com/devrelm) (see [#2185](https://github.com/styled-components/styled-components/pull/2185)) - Allow disabling "speedy" mode via global `SC_DISABLE_SPEEDY` variable, by [@devrelm](https://github.com/devrelm) (see [#2185](https://github.com/styled-components/styled-components/pull/2185)) @@ -40,6 +39,8 @@ _The format is based on [Keep a Changelog](http://keepachangelog.com/) and this Support for this will be removed in styled-components v5. The primary impetus behind this change is to eliminate confusion around basic functions vs styled-components vs React components provided as values in the object-form attrs constructor, each of which has different handling behaviors. The single outer function to receive the props and then return a props object is conceptually simpler. +- The standalone CDN build is now UMD-compliant and can be used with RequireJS, etc. + ## [v4.0.3] - 2018-10-30 - Interpolating a styled component into a string now returns the static component selector (emotion cross-compat) diff --git a/rollup.config.js b/rollup.config.js index 8ec799b4..ab35972c 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -75,8 +75,7 @@ const standaloneBaseConfig = { input: './src/index-standalone.js', output: { file: 'dist/styled-components.js', - format: 'iife', - footer: ';window.styled = styled;', + format: 'umd', globals, name: 'styled', sourcemap: true,