@vanilla-extract/next-plugin 2.4.11 → 2.4.13

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.
@@ -8,6 +8,7 @@ var next = require('@vanilla-extract/webpack-plugin/next');
8
8
  var findPagesDir = require('next/dist/lib/find-pages-dir');
9
9
  var css = require('next/dist/build/webpack/config/blocks/css');
10
10
  var fileResolve = require('next/dist/build/webpack/config/blocks/css/loaders/file-resolve');
11
+ var node_module = require('node:module');
11
12
 
12
13
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
13
14
 
@@ -15,6 +16,7 @@ var browserslist__default = /*#__PURE__*/_interopDefault(browserslist);
15
16
  var NextMiniCssExtractPluginDefault__default = /*#__PURE__*/_interopDefault(NextMiniCssExtractPluginDefault);
16
17
 
17
18
  // @ts-expect-error
19
+ const require$1 = node_module.createRequire((typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('dist/vanilla-extract-next-plugin.cjs.dev.js', document.baseURI).href)));
18
20
  const NextMiniCssExtractPlugin = NextMiniCssExtractPluginDefault__default["default"];
19
21
 
20
22
  // Adopted from https://github.com/vercel/next.js/blob/1f1632979c78b3edfe59fd85d8cce62efcdee688/packages/next/build/webpack-config.ts#L60-L72
@@ -80,7 +82,7 @@ const getVanillaExtractCssLoaders = (options, assetPrefix, hasAppDir) => {
80
82
 
81
83
  // https://github.com/vercel/next.js/blob/6e5b935fd7a61497f6854a81aec7df3a5dbf61ac/packages/next/src/build/webpack/config/blocks/css/loaders/global.ts#L28
82
84
  loaders.push({
83
- loader: require.resolve('next/dist/build/webpack/loaders/css-loader/src'),
85
+ loader: require$1.resolve('next/dist/build/webpack/loaders/css-loader/src'),
84
86
  options: {
85
87
  postcss,
86
88
  importLoaders: 1,
@@ -98,7 +100,7 @@ const getVanillaExtractCssLoaders = (options, assetPrefix, hasAppDir) => {
98
100
 
99
101
  // https://github.com/vercel/next.js/blob/6e5b935fd7a61497f6854a81aec7df3a5dbf61ac/packages/next/src/build/webpack/config/blocks/css/loaders/global.ts#L29-L38
100
102
  loaders.push({
101
- loader: require.resolve('next/dist/build/webpack/loaders/postcss-loader/src'),
103
+ loader: require$1.resolve('next/dist/build/webpack/loaders/postcss-loader/src'),
102
104
  options: {
103
105
  postcss
104
106
  }
@@ -8,6 +8,7 @@ var next = require('@vanilla-extract/webpack-plugin/next');
8
8
  var findPagesDir = require('next/dist/lib/find-pages-dir');
9
9
  var css = require('next/dist/build/webpack/config/blocks/css');
10
10
  var fileResolve = require('next/dist/build/webpack/config/blocks/css/loaders/file-resolve');
11
+ var node_module = require('node:module');
11
12
 
12
13
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
13
14
 
@@ -15,6 +16,7 @@ var browserslist__default = /*#__PURE__*/_interopDefault(browserslist);
15
16
  var NextMiniCssExtractPluginDefault__default = /*#__PURE__*/_interopDefault(NextMiniCssExtractPluginDefault);
16
17
 
17
18
  // @ts-expect-error
19
+ const require$1 = node_module.createRequire((typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('dist/vanilla-extract-next-plugin.cjs.prod.js', document.baseURI).href)));
18
20
  const NextMiniCssExtractPlugin = NextMiniCssExtractPluginDefault__default["default"];
19
21
 
20
22
  // Adopted from https://github.com/vercel/next.js/blob/1f1632979c78b3edfe59fd85d8cce62efcdee688/packages/next/build/webpack-config.ts#L60-L72
@@ -80,7 +82,7 @@ const getVanillaExtractCssLoaders = (options, assetPrefix, hasAppDir) => {
80
82
 
81
83
  // https://github.com/vercel/next.js/blob/6e5b935fd7a61497f6854a81aec7df3a5dbf61ac/packages/next/src/build/webpack/config/blocks/css/loaders/global.ts#L28
82
84
  loaders.push({
83
- loader: require.resolve('next/dist/build/webpack/loaders/css-loader/src'),
85
+ loader: require$1.resolve('next/dist/build/webpack/loaders/css-loader/src'),
84
86
  options: {
85
87
  postcss,
86
88
  importLoaders: 1,
@@ -98,7 +100,7 @@ const getVanillaExtractCssLoaders = (options, assetPrefix, hasAppDir) => {
98
100
 
99
101
  // https://github.com/vercel/next.js/blob/6e5b935fd7a61497f6854a81aec7df3a5dbf61ac/packages/next/src/build/webpack/config/blocks/css/loaders/global.ts#L29-L38
100
102
  loaders.push({
101
- loader: require.resolve('next/dist/build/webpack/loaders/postcss-loader/src'),
103
+ loader: require$1.resolve('next/dist/build/webpack/loaders/postcss-loader/src'),
102
104
  options: {
103
105
  postcss
104
106
  }
@@ -4,8 +4,10 @@ import { VanillaExtractPlugin } from '@vanilla-extract/webpack-plugin/next';
4
4
  import { findPagesDir } from 'next/dist/lib/find-pages-dir';
5
5
  import { lazyPostCSS } from 'next/dist/build/webpack/config/blocks/css';
6
6
  import { cssFileResolve } from 'next/dist/build/webpack/config/blocks/css/loaders/file-resolve';
7
+ import { createRequire } from 'node:module';
7
8
 
8
9
  // @ts-expect-error
10
+ const require = createRequire(import.meta.url);
9
11
  const NextMiniCssExtractPlugin = NextMiniCssExtractPluginDefault;
10
12
 
11
13
  // Adopted from https://github.com/vercel/next.js/blob/1f1632979c78b3edfe59fd85d8cce62efcdee688/packages/next/build/webpack-config.ts#L60-L72
package/package.json CHANGED
@@ -1,10 +1,18 @@
1
1
  {
2
2
  "name": "@vanilla-extract/next-plugin",
3
- "version": "2.4.11",
3
+ "version": "2.4.13",
4
4
  "description": "Zero-runtime Stylesheets-in-TypeScript",
5
5
  "main": "dist/vanilla-extract-next-plugin.cjs.js",
6
6
  "module": "dist/vanilla-extract-next-plugin.esm.js",
7
7
  "types": "dist/vanilla-extract-next-plugin.cjs.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/vanilla-extract-next-plugin.cjs.d.ts",
11
+ "import": "./dist/vanilla-extract-next-plugin.esm.js",
12
+ "default": "./dist/vanilla-extract-next-plugin.cjs.js"
13
+ },
14
+ "./package.json": "./package.json"
15
+ },
8
16
  "preconstruct": {
9
17
  "entrypoints": [
10
18
  "index.ts"
@@ -21,7 +29,7 @@
21
29
  "author": "SEEK",
22
30
  "license": "MIT",
23
31
  "dependencies": {
24
- "@vanilla-extract/webpack-plugin": "^2.3.19"
32
+ "@vanilla-extract/webpack-plugin": "^2.3.21"
25
33
  },
26
34
  "peerDependencies": {
27
35
  "next": ">=12.1.7"