@muonic/muon 0.0.2-beta.24 → 0.0.2-beta.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.0.2-beta.25](https://github.com/centrica-engineering/muon/compare/v0.0.2-beta.24...v0.0.2-beta.25) (2023-07-05)
6
+
5
7
  ### [0.0.2-beta.24](https://github.com/centrica-engineering/muon/compare/v0.0.2-beta.23...v0.0.2-beta.24) (2023-07-04)
6
8
 
7
9
  ### [0.0.2-beta.23](https://github.com/centrica-engineering/muon/compare/v0.0.2-beta.22...v0.0.2-beta.23) (2023-07-04)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@muonic/muon",
3
- "version": "0.0.2-beta.24",
3
+ "version": "0.0.2-beta.25",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -132,7 +132,8 @@ const aliasConfig = {
132
132
  const styleConfig = {
133
133
  mode: 'emit',
134
134
  minimize: true,
135
- plugins: postcssPlugins
135
+ plugins: postcssPlugins,
136
+ extract: true
136
137
  };
137
138
 
138
139
  const replaceConfig = {
@@ -158,6 +159,19 @@ export const rollupPlugins = [
158
159
  replacePlugin(replaceConfig),
159
160
  stylesPlugin(styleConfig),
160
161
  litcssPlugin({ exclude: ['**/css/*.css', '**/dist/*.css', 'muon.min.css', '**/**/*.slotted.css'] }),
161
- cssPlugin({ include: '**/**/*.slotted.css' }),
162
+ cssPlugin({
163
+ include: '**/**/*.slotted.css',
164
+ transform: (css) => {
165
+ // TODO: find a way to not have to do this - find why css is being turned to a function and then a string
166
+ const styles = css.replaceAll('export default "', '').replaceAll('";', '');
167
+ const needsUnescaping = /\\./.test(styles);
168
+
169
+ if (needsUnescaping) {
170
+ return JSON.parse(`"${styles}"`);
171
+ }
172
+
173
+ return styles;
174
+ }
175
+ }),
162
176
  muonPlugin()
163
177
  ];