next-yak 7.0.0 → 8.0.0
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/README.md +8 -8
- package/dist/context/baseContext.cjs.map +1 -1
- package/dist/context/baseContext.d.cts +4 -1
- package/dist/context/baseContext.d.ts +4 -1
- package/dist/context/baseContext.js.map +1 -1
- package/dist/context/index.cjs +4 -1
- package/dist/context/index.cjs.map +1 -1
- package/dist/context/index.d.cts +2 -2
- package/dist/context/index.d.ts +2 -2
- package/dist/context/index.js +5 -2
- package/dist/context/index.js.map +1 -1
- package/dist/context/index.server.cjs +6 -2
- package/dist/context/index.server.cjs.map +1 -1
- package/dist/context/index.server.js +10 -4
- package/dist/context/index.server.js.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/loaders/turbo-loader.d.ts +15 -0
- package/dist/loaders/turbo-loader.js +896 -0
- package/dist/loaders/turbo-loader.js.map +1 -0
- package/dist/loaders/{css-loader.js → webpack-loader.js} +50 -62
- package/dist/loaders/webpack-loader.js.map +1 -0
- package/dist/withYak/index.cjs +80 -15
- package/dist/withYak/index.cjs.map +1 -1
- package/dist/withYak/index.d.cts +6 -4
- package/dist/withYak/index.d.ts +6 -4
- package/dist/withYak/index.js +80 -15
- package/dist/withYak/index.js.map +1 -1
- package/loaders/lib/debugLogger.ts +33 -0
- package/loaders/lib/extractCss.ts +39 -0
- package/loaders/lib/resolveCrossFileSelectors.ts +3 -1
- package/loaders/turbo-loader.ts +187 -0
- package/loaders/webpack-loader.ts +43 -0
- package/package.json +19 -17
- package/runtime/context/README.md +6 -2
- package/runtime/context/baseContext.tsx +3 -1
- package/runtime/context/index.server.tsx +12 -4
- package/runtime/context/index.tsx +8 -5
- package/withYak/index.ts +145 -24
- package/dist/loaders/css-loader.js.map +0 -1
- package/loaders/css-loader.ts +0 -110
- /package/dist/loaders/{css-loader.d.ts → webpack-loader.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|

|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/next-yak)
|
|
6
|
-
[](https://github.com/
|
|
6
|
+
[](https://github.com/DigitecGalaxus/next-yak/blob/main/LICENSE)
|
|
7
7
|
|
|
8
8
|
**next-yak** is a CSS-in-JS solution tailored for [Next.js](https://nextjs.org/) that seamlessly combines the expressive power of styled-components syntax with efficient build-time extraction of CSS using Next.js's built-in CSS configuration.
|
|
9
9
|
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
- **Standard CSS Syntax**: Write styles in familiar, easy-to-use CSS
|
|
17
17
|
- **Integrates with Atomic CSS**: Easily combines with atomic CSS frameworks like Tailwind CSS for more design options
|
|
18
18
|
|
|
19
|
-
[Preview (Video)](https://github.com/
|
|
19
|
+
[Preview (Video)](https://github.com/DigitecGalaxus/next-yak/assets/4113649/f5a220fc-2a0f-46be-a8e7-c855f7faa337
|
|
20
20
|
)
|
|
21
21
|
|
|
22
22
|
## Compatibility
|
|
@@ -97,7 +97,7 @@ const ToggleButton = styled.button`
|
|
|
97
97
|
`;
|
|
98
98
|
```
|
|
99
99
|
|
|
100
|
-
[Dynamic Styles (Video)](https://github.com/
|
|
100
|
+
[Dynamic Styles (Video)](https://github.com/DigitecGalaxus/next-yak/assets/4113649/c5f52846-33e4-4058-9c78-efd98197d75f)
|
|
101
101
|
|
|
102
102
|
### Dynamic Properties
|
|
103
103
|
|
|
@@ -128,7 +128,7 @@ const ExampleComponent = () => {
|
|
|
128
128
|
};
|
|
129
129
|
```
|
|
130
130
|
|
|
131
|
-
[Dynamic Props (video)](https://github.com/
|
|
131
|
+
[Dynamic Props (video)](https://github.com/DigitecGalaxus/next-yak/assets/4113649/2fa78f82-382c-465f-b294-2504739ea168)
|
|
132
132
|
|
|
133
133
|
|
|
134
134
|
### Targeting Components
|
|
@@ -178,7 +178,7 @@ module.exports = {
|
|
|
178
178
|
};
|
|
179
179
|
```
|
|
180
180
|
|
|
181
|
-
[Nesting Example (video)](https://github.com/
|
|
181
|
+
[Nesting Example (video)](https://github.com/DigitecGalaxus/next-yak/assets/4113649/33eeeb13-b0cf-499f-a1d3-ba6f51cf4308)
|
|
182
182
|
|
|
183
183
|
## Motivation
|
|
184
184
|
|
|
@@ -205,13 +205,13 @@ Optimizations are done by postcss. This allows to use the full power of postcss
|
|
|
205
205
|
|
|
206
206
|
## Performance Gains
|
|
207
207
|
|
|
208
|
-
[](https://raw.githubusercontent.com/DigitecGalaxus/next-yak/main/css-extract.gif)
|
|
209
209
|
|
|
210
210
|
## How it works
|
|
211
211
|
|
|
212
212
|
next-yak converts css-in-js into css modules. This allows to use the full power of postcss and its plugins. It also allows to use the same optimizations for css files and css-in-js.
|
|
213
213
|
|
|
214
|
-
[](https://raw.githubusercontent.com/DigitecGalaxus/next-yak/main/compile-flow.webp)
|
|
215
215
|
|
|
216
216
|
|
|
217
217
|
## Atomic CSS
|
|
@@ -271,7 +271,7 @@ const Container = styled.div`
|
|
|
271
271
|
| Yak Features | All (`styled`, `css`, ...) | 🚫 |
|
|
272
272
|
|
|
273
273
|
|
|
274
|
-
[Build time constants (video)](https://github.com/
|
|
274
|
+
[Build time constants (video)](https://github.com/DigitecGalaxus/next-yak/assets/4113649/2c83246c-a03b-4c57-8814-32a7248983ac)
|
|
275
275
|
|
|
276
276
|
## Yak shaving
|
|
277
277
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../runtime/context/baseContext.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../../runtime/context/baseContext.tsx"],"sourcesContent":["import type { YakTheme } from \"./index.js\";\n\nexport function getYakThemeContext() {\n return {} as YakTheme | undefined;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEO,SAAS,qBAAqB;AACnC,SAAO,CAAC;AACV;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../runtime/context/baseContext.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../../runtime/context/baseContext.tsx"],"sourcesContent":["import type { YakTheme } from \"./index.js\";\n\nexport function getYakThemeContext() {\n return {} as YakTheme | undefined;\n}\n"],"mappings":";AAEO,SAAS,qBAAqB;AACnC,SAAO,CAAC;AACV;","names":[]}
|
package/dist/context/index.cjs
CHANGED
|
@@ -37,7 +37,10 @@ __export(index_exports, {
|
|
|
37
37
|
module.exports = __toCommonJS(index_exports);
|
|
38
38
|
var import_react = __toESM(require("react"), 1);
|
|
39
39
|
var YakContext = (0, import_react.createContext)({});
|
|
40
|
-
var useTheme = () =>
|
|
40
|
+
var useTheme = () => {
|
|
41
|
+
const context = (0, import_react.use)(YakContext);
|
|
42
|
+
return context instanceof Promise ? (0, import_react.use)(context) : context;
|
|
43
|
+
};
|
|
41
44
|
var YakThemeProvider = ({
|
|
42
45
|
children,
|
|
43
46
|
theme = {}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../runtime/context/index.tsx"],"sourcesContent":["\"use client\";\n//\n// This file is the client component (browser & ssr) version of index.server.tsx\n//\nimport React, { ReactNode, createContext,
|
|
1
|
+
{"version":3,"sources":["../../runtime/context/index.tsx"],"sourcesContent":["\"use client\";\n//\n// This file is the client component (browser & ssr) version of index.server.tsx\n//\nimport React, { ReactNode, createContext, use } from \"react\";\n\nexport interface YakTheme {}\n\n/**\n * The yak theme context\n * @see https://github.com/DigitecGalaxus/next-yak/blob/main/packages/next-yak/runtime/context/README.md\n */\nconst YakContext = createContext<YakTheme>({});\n\n/**\n * Returns the current yak theme context\n *\n * @see https://github.com/DigitecGalaxus/next-yak/blob/main/packages/next-yak/runtime/context/README.md\n */\nexport const useTheme = (): YakTheme => {\n const context = use(YakContext);\n return context instanceof Promise ? use(context) : context;\n};\n\n/**\n * Yak theme context provider\n *\n * @see https://github.com/DigitecGalaxus/next-yak/blob/main/packages/next-yak/runtime/context/README.md\n */\nexport const YakThemeProvider = ({\n children,\n theme = {},\n}: {\n children: ReactNode;\n theme?: YakTheme;\n}) => <YakContext.Provider value={theme}>{children}</YakContext.Provider>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,mBAAqD;AAQrD,IAAM,iBAAa,4BAAwB,CAAC,CAAC;AAOtC,IAAM,WAAW,MAAgB;AACtC,QAAM,cAAU,kBAAI,UAAU;AAC9B,SAAO,mBAAmB,cAAU,kBAAI,OAAO,IAAI;AACrD;AAOO,IAAM,mBAAmB,CAAC;AAAA,EAC/B;AAAA,EACA,QAAQ,CAAC;AACX,MAGM,6BAAAA,QAAA,cAAC,WAAW,UAAX,EAAoB,OAAO,SAAQ,QAAS;","names":["React"]}
|
package/dist/context/index.d.cts
CHANGED
|
@@ -5,13 +5,13 @@ interface YakTheme {
|
|
|
5
5
|
/**
|
|
6
6
|
* Returns the current yak theme context
|
|
7
7
|
*
|
|
8
|
-
* @see https://github.com/
|
|
8
|
+
* @see https://github.com/DigitecGalaxus/next-yak/blob/main/packages/next-yak/runtime/context/README.md
|
|
9
9
|
*/
|
|
10
10
|
declare const useTheme: () => YakTheme;
|
|
11
11
|
/**
|
|
12
12
|
* Yak theme context provider
|
|
13
13
|
*
|
|
14
|
-
* @see https://github.com/
|
|
14
|
+
* @see https://github.com/DigitecGalaxus/next-yak/blob/main/packages/next-yak/runtime/context/README.md
|
|
15
15
|
*/
|
|
16
16
|
declare const YakThemeProvider: ({ children, theme, }: {
|
|
17
17
|
children: ReactNode;
|
package/dist/context/index.d.ts
CHANGED
|
@@ -5,13 +5,13 @@ interface YakTheme {
|
|
|
5
5
|
/**
|
|
6
6
|
* Returns the current yak theme context
|
|
7
7
|
*
|
|
8
|
-
* @see https://github.com/
|
|
8
|
+
* @see https://github.com/DigitecGalaxus/next-yak/blob/main/packages/next-yak/runtime/context/README.md
|
|
9
9
|
*/
|
|
10
10
|
declare const useTheme: () => YakTheme;
|
|
11
11
|
/**
|
|
12
12
|
* Yak theme context provider
|
|
13
13
|
*
|
|
14
|
-
* @see https://github.com/
|
|
14
|
+
* @see https://github.com/DigitecGalaxus/next-yak/blob/main/packages/next-yak/runtime/context/README.md
|
|
15
15
|
*/
|
|
16
16
|
declare const YakThemeProvider: ({ children, theme, }: {
|
|
17
17
|
children: ReactNode;
|
package/dist/context/index.js
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
// runtime/context/index.tsx
|
|
4
|
-
import React, { createContext,
|
|
4
|
+
import React, { createContext, use } from "react";
|
|
5
5
|
var YakContext = createContext({});
|
|
6
|
-
var useTheme = () =>
|
|
6
|
+
var useTheme = () => {
|
|
7
|
+
const context = use(YakContext);
|
|
8
|
+
return context instanceof Promise ? use(context) : context;
|
|
9
|
+
};
|
|
7
10
|
var YakThemeProvider = ({
|
|
8
11
|
children,
|
|
9
12
|
theme = {}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../runtime/context/index.tsx"],"sourcesContent":["\"use client\";\n//\n// This file is the client component (browser & ssr) version of index.server.tsx\n//\nimport React, { ReactNode, createContext,
|
|
1
|
+
{"version":3,"sources":["../../runtime/context/index.tsx"],"sourcesContent":["\"use client\";\n//\n// This file is the client component (browser & ssr) version of index.server.tsx\n//\nimport React, { ReactNode, createContext, use } from \"react\";\n\nexport interface YakTheme {}\n\n/**\n * The yak theme context\n * @see https://github.com/DigitecGalaxus/next-yak/blob/main/packages/next-yak/runtime/context/README.md\n */\nconst YakContext = createContext<YakTheme>({});\n\n/**\n * Returns the current yak theme context\n *\n * @see https://github.com/DigitecGalaxus/next-yak/blob/main/packages/next-yak/runtime/context/README.md\n */\nexport const useTheme = (): YakTheme => {\n const context = use(YakContext);\n return context instanceof Promise ? use(context) : context;\n};\n\n/**\n * Yak theme context provider\n *\n * @see https://github.com/DigitecGalaxus/next-yak/blob/main/packages/next-yak/runtime/context/README.md\n */\nexport const YakThemeProvider = ({\n children,\n theme = {},\n}: {\n children: ReactNode;\n theme?: YakTheme;\n}) => <YakContext.Provider value={theme}>{children}</YakContext.Provider>;\n"],"mappings":";;;AAIA,OAAO,SAAoB,eAAe,WAAW;AAQrD,IAAM,aAAa,cAAwB,CAAC,CAAC;AAOtC,IAAM,WAAW,MAAgB;AACtC,QAAM,UAAU,IAAI,UAAU;AAC9B,SAAO,mBAAmB,UAAU,IAAI,OAAO,IAAI;AACrD;AAOO,IAAM,mBAAmB,CAAC;AAAA,EAC/B;AAAA,EACA,QAAQ,CAAC;AACX,MAGM,oCAAC,WAAW,UAAX,EAAoB,OAAO,SAAQ,QAAS;","names":[]}
|
|
@@ -37,9 +37,13 @@ module.exports = __toCommonJS(index_server_exports);
|
|
|
37
37
|
var import_react = __toESM(require("react"), 1);
|
|
38
38
|
var import_index = require("./index.js");
|
|
39
39
|
var import_baseContext = require("next-yak/context/baseContext");
|
|
40
|
-
var
|
|
40
|
+
var getYakContext = (0, import_react.cache)(() => (0, import_baseContext.getYakThemeContext)());
|
|
41
|
+
var useTheme = () => {
|
|
42
|
+
const theme = getYakContext();
|
|
43
|
+
return theme instanceof Promise ? (0, import_react.use)(theme) : theme;
|
|
44
|
+
};
|
|
41
45
|
var YakThemeProvider = ({ children }) => {
|
|
42
|
-
return /* @__PURE__ */ import_react.default.createElement(import_index.YakThemeProvider, { theme:
|
|
46
|
+
return /* @__PURE__ */ import_react.default.createElement(import_index.YakThemeProvider, { theme: getYakContext() }, children);
|
|
43
47
|
};
|
|
44
48
|
// Annotate the CommonJS export names for ESM import in node:
|
|
45
49
|
0 && (module.exports = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../runtime/context/index.server.tsx"],"sourcesContent":["//\n// This file is the react-server component version of index.tsx\n//\n\n// @ts-ignore - in the current @types/react \"cache\" is not typed\nimport React, { ReactNode, cache } from \"react\";\nimport {
|
|
1
|
+
{"version":3,"sources":["../../runtime/context/index.server.tsx"],"sourcesContent":["//\n// This file is the react-server component version of index.tsx\n//\n\n// @ts-ignore - in the current @types/react \"cache\" is not typed\nimport React, { ReactNode, cache, use } from \"react\";\nimport {\n YakTheme,\n YakThemeProvider as YakThemeClientProvider,\n} from \"./index.js\";\n\n// the following import might be changed by\n// the user config in withYak to point to their own\n// context\nimport { getYakThemeContext } from \"next-yak/context/baseContext\";\n\n/** Request based RSC YAK Context */\nconst getYakContext = cache(() => getYakThemeContext());\nexport const useTheme = (): YakTheme | undefined => {\n const theme: YakTheme | undefined | Promise<YakTheme> = getYakContext();\n return theme instanceof Promise ? use(theme) : theme;\n};\nexport const YakThemeProvider = ({ children }: { children: ReactNode }) => {\n return (\n <YakThemeClientProvider theme={getYakContext()}>\n {children}\n </YakThemeClientProvider>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAKA,mBAA6C;AAC7C,mBAGO;AAKP,yBAAmC;AAGnC,IAAM,oBAAgB,oBAAM,UAAM,uCAAmB,CAAC;AAC/C,IAAM,WAAW,MAA4B;AAClD,QAAM,QAAkD,cAAc;AACtE,SAAO,iBAAiB,cAAU,kBAAI,KAAK,IAAI;AACjD;AACO,IAAM,mBAAmB,CAAC,EAAE,SAAS,MAA+B;AACzE,SACE,6BAAAA,QAAA,cAAC,aAAAC,kBAAA,EAAuB,OAAO,cAAc,KAC1C,QACH;AAEJ;","names":["React","YakThemeClientProvider"]}
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
// runtime/context/index.server.tsx
|
|
2
|
-
import React, { cache } from "react";
|
|
3
|
-
import {
|
|
2
|
+
import React, { cache, use } from "react";
|
|
3
|
+
import {
|
|
4
|
+
YakThemeProvider as YakThemeClientProvider
|
|
5
|
+
} from "./index.js";
|
|
4
6
|
import { getYakThemeContext } from "next-yak/context/baseContext";
|
|
5
|
-
var
|
|
7
|
+
var getYakContext = cache(() => getYakThemeContext());
|
|
8
|
+
var useTheme = () => {
|
|
9
|
+
const theme = getYakContext();
|
|
10
|
+
return theme instanceof Promise ? use(theme) : theme;
|
|
11
|
+
};
|
|
6
12
|
var YakThemeProvider = ({ children }) => {
|
|
7
|
-
return /* @__PURE__ */ React.createElement(YakThemeClientProvider, { theme:
|
|
13
|
+
return /* @__PURE__ */ React.createElement(YakThemeClientProvider, { theme: getYakContext() }, children);
|
|
8
14
|
};
|
|
9
15
|
export {
|
|
10
16
|
YakThemeProvider,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../runtime/context/index.server.tsx"],"sourcesContent":["//\n// This file is the react-server component version of index.tsx\n//\n\n// @ts-ignore - in the current @types/react \"cache\" is not typed\nimport React, { ReactNode, cache } from \"react\";\nimport {
|
|
1
|
+
{"version":3,"sources":["../../runtime/context/index.server.tsx"],"sourcesContent":["//\n// This file is the react-server component version of index.tsx\n//\n\n// @ts-ignore - in the current @types/react \"cache\" is not typed\nimport React, { ReactNode, cache, use } from \"react\";\nimport {\n YakTheme,\n YakThemeProvider as YakThemeClientProvider,\n} from \"./index.js\";\n\n// the following import might be changed by\n// the user config in withYak to point to their own\n// context\nimport { getYakThemeContext } from \"next-yak/context/baseContext\";\n\n/** Request based RSC YAK Context */\nconst getYakContext = cache(() => getYakThemeContext());\nexport const useTheme = (): YakTheme | undefined => {\n const theme: YakTheme | undefined | Promise<YakTheme> = getYakContext();\n return theme instanceof Promise ? use(theme) : theme;\n};\nexport const YakThemeProvider = ({ children }: { children: ReactNode }) => {\n return (\n <YakThemeClientProvider theme={getYakContext()}>\n {children}\n </YakThemeClientProvider>\n );\n};\n"],"mappings":";AAKA,OAAO,SAAoB,OAAO,WAAW;AAC7C;AAAA,EAEE,oBAAoB;AAAA,OACf;AAKP,SAAS,0BAA0B;AAGnC,IAAM,gBAAgB,MAAM,MAAM,mBAAmB,CAAC;AAC/C,IAAM,WAAW,MAA4B;AAClD,QAAM,QAAkD,cAAc;AACtE,SAAO,iBAAiB,UAAU,IAAI,KAAK,IAAI;AACjD;AACO,IAAM,mBAAmB,CAAC,EAAE,SAAS,MAA+B;AACzE,SACE,oCAAC,0BAAuB,OAAO,cAAc,KAC1C,QACH;AAEJ;","names":[]}
|
package/dist/index.d.cts
CHANGED
|
@@ -5,13 +5,13 @@ interface YakTheme {
|
|
|
5
5
|
/**
|
|
6
6
|
* Returns the current yak theme context
|
|
7
7
|
*
|
|
8
|
-
* @see https://github.com/
|
|
8
|
+
* @see https://github.com/DigitecGalaxus/next-yak/blob/main/packages/next-yak/runtime/context/README.md
|
|
9
9
|
*/
|
|
10
10
|
declare const useTheme: () => YakTheme;
|
|
11
11
|
/**
|
|
12
12
|
* Yak theme context provider
|
|
13
13
|
*
|
|
14
|
-
* @see https://github.com/
|
|
14
|
+
* @see https://github.com/DigitecGalaxus/next-yak/blob/main/packages/next-yak/runtime/context/README.md
|
|
15
15
|
*/
|
|
16
16
|
declare const YakThemeProvider: ({ children, theme, }: {
|
|
17
17
|
children: ReactNode;
|
package/dist/index.d.ts
CHANGED
|
@@ -5,13 +5,13 @@ interface YakTheme {
|
|
|
5
5
|
/**
|
|
6
6
|
* Returns the current yak theme context
|
|
7
7
|
*
|
|
8
|
-
* @see https://github.com/
|
|
8
|
+
* @see https://github.com/DigitecGalaxus/next-yak/blob/main/packages/next-yak/runtime/context/README.md
|
|
9
9
|
*/
|
|
10
10
|
declare const useTheme: () => YakTheme;
|
|
11
11
|
/**
|
|
12
12
|
* Yak theme context provider
|
|
13
13
|
*
|
|
14
|
-
* @see https://github.com/
|
|
14
|
+
* @see https://github.com/DigitecGalaxus/next-yak/blob/main/packages/next-yak/runtime/context/README.md
|
|
15
15
|
*/
|
|
16
16
|
declare const YakThemeProvider: ({ children, theme, }: {
|
|
17
17
|
children: ReactNode;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { LoaderContext } from 'webpack';
|
|
2
|
+
import { YakConfigOptions } from '../withYak/index.ts';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* This loader transforms styled-components styles to a static data-url import
|
|
6
|
+
* The compile-time nexy-yak transformation takes javascript/typescript as input,
|
|
7
|
+
* strips all inline css code and adds the css as static css urls
|
|
8
|
+
* e.g.: `import "data:text/css;base64,"`
|
|
9
|
+
*/
|
|
10
|
+
declare function cssExtractLoader(this: LoaderContext<{
|
|
11
|
+
yakOptions: YakConfigOptions;
|
|
12
|
+
yakPluginOptions: any;
|
|
13
|
+
}>, code: string, sourceMap: string | undefined): Promise<string | void>;
|
|
14
|
+
|
|
15
|
+
export { cssExtractLoader as default };
|