@atomic-variants/next-plugin 0.2.1 → 0.2.2
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/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/index.ts +1 -2
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let c=require(`@atomic-variants/webpack-plugin`);c=s(c);
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let c=require(`@atomic-variants/webpack-plugin`);c=s(c);const l=`__atomic_generated`,u=RegExp(`/\\*\\s*${l}:([^*]+)\\s*\\*/`,`g`);function d(e){return{...e,webpack:(t,n)=>(t.plugins?.push(new c.default({filePath:new URL(`../atomic-variants.css`,require(`url`).pathToFileURL(__filename).href).pathname})),typeof e.webpack==`function`?e.webpack(t,n):t),experimental:{...e.experimental,swcPlugins:[...e.experimental?.swcPlugins||[],[`@atomic-variants/swc-plugin`,{tag:l}]]}}}exports.withAtomicVariants=d;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@atomic-variants/webpack-plugin";
|
|
1
|
+
import e from"@atomic-variants/webpack-plugin";const t=`__atomic_generated`;RegExp(`/\\*\\s*${t}:([^*]+)\\s*\\*/`,`g`);function n(n){return{...n,webpack:(t,r)=>(t.plugins?.push(new e({filePath:new URL(`../atomic-variants.css`,import.meta.url).pathname})),typeof n.webpack==`function`?n.webpack(t,r):t),experimental:{...n.experimental,swcPlugins:[...n.experimental?.swcPlugins||[],[`@atomic-variants/swc-plugin`,{tag:t}]]}}}export{n as withAtomicVariants};
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ATOMIC_TAG } from "@atomic-variants/constants";
|
|
2
2
|
import AtomicVariantsPlugin from "@atomic-variants/webpack-plugin";
|
|
3
3
|
import type { NextConfig } from "next";
|
|
4
|
-
import path from "path";
|
|
5
4
|
|
|
6
5
|
export function withAtomicVariants(nextConfig: NextConfig) {
|
|
7
6
|
return {
|
|
@@ -9,7 +8,7 @@ export function withAtomicVariants(nextConfig: NextConfig) {
|
|
|
9
8
|
webpack: (webpackConfig, options) => {
|
|
10
9
|
webpackConfig.plugins?.push(
|
|
11
10
|
new AtomicVariantsPlugin({
|
|
12
|
-
filePath:
|
|
11
|
+
filePath: new URL("../atomic-variants.css", import.meta.url).pathname,
|
|
13
12
|
})
|
|
14
13
|
);
|
|
15
14
|
|