@plumeria/next-plugin 0.28.2 → 1.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/dist/index.js CHANGED
@@ -10,7 +10,7 @@ function withPlumeria(nextConfig) {
10
10
  if (typeof originalWebpack === 'function') {
11
11
  config = originalWebpack(config, context);
12
12
  }
13
- if (context.dev && context.isServer) {
13
+ if (context.dev) {
14
14
  config.watchOptions = {
15
15
  ignored: ['node_modules', '.next', '.git'],
16
16
  };
@@ -0,0 +1,2 @@
1
+ import type { NextConfig } from 'next/dist/server/config-shared';
2
+ export declare const withPlumeria: (nextConfig?: NextConfig) => NextConfig;
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.withPlumeria = void 0;
4
+ const withPlumeria = (nextConfig = {}) => {
5
+ if (process.env.NODE_ENV === 'production')
6
+ return nextConfig;
7
+ const reactLoaders = [
8
+ {
9
+ loader: '@plumeria/turbopack-loader',
10
+ options: {},
11
+ },
12
+ ];
13
+ return {
14
+ ...nextConfig,
15
+ turbopack: {
16
+ ...nextConfig?.turbopack,
17
+ rules: {
18
+ '*.ts': {
19
+ loaders: reactLoaders,
20
+ },
21
+ '*.tsx': {
22
+ loaders: reactLoaders,
23
+ },
24
+ '*.js': {
25
+ loaders: reactLoaders,
26
+ },
27
+ '*.jsx': {
28
+ loaders: reactLoaders,
29
+ },
30
+ },
31
+ },
32
+ };
33
+ };
34
+ exports.withPlumeria = withPlumeria;
package/package.json CHANGED
@@ -1,12 +1,24 @@
1
1
  {
2
2
  "name": "@plumeria/next-plugin",
3
- "version": "0.28.2",
3
+ "version": "1.0.0",
4
4
  "description": "Plumeria Next.js plugin",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/zss-in-js/plumeria.git",
8
8
  "directory": "packages/next-plugin"
9
9
  },
10
+ "exports": {
11
+ ".": {
12
+ "types": "./dist/index.d.ts",
13
+ "import": "./dist/index.js",
14
+ "default": "./dist/index.js"
15
+ },
16
+ "./turbopack": {
17
+ "types": "./dist/turbopack.d.ts",
18
+ "import": "./dist/turbopack.js",
19
+ "default": "./dist/turbopack.js"
20
+ }
21
+ },
10
22
  "main": "dist/index.js",
11
23
  "types": "dist/index.d.ts",
12
24
  "license": "MIT",
@@ -14,11 +26,12 @@
14
26
  "dist/"
15
27
  ],
16
28
  "dependencies": {
17
- "@plumeria/webpack-plugin": "^0.28.2"
29
+ "@plumeria/webpack-plugin": "^1.0.0",
30
+ "@plumeria/turbopack-loader": "^1.0.0"
18
31
  },
19
32
  "devDependencies": {
20
33
  "next": "^16.0.3",
21
- "webpack": "^5.101.0"
34
+ "webpack": "5.101.0"
22
35
  },
23
36
  "publishConfig": {
24
37
  "access": "public",