@plumeria/next-plugin 0.1.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.d.ts +2 -0
- package/dist/index.js +25 -0
- package/package.json +30 -0
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.withPlumeria = withPlumeria;
|
|
4
|
+
const webpack_plugin_1 = require("@plumeria/webpack-plugin");
|
|
5
|
+
function withPlumeria(nextConfig = {}) {
|
|
6
|
+
const originalWebpack = nextConfig.webpack;
|
|
7
|
+
return {
|
|
8
|
+
...nextConfig,
|
|
9
|
+
webpack(config, context) {
|
|
10
|
+
if (typeof originalWebpack === 'function') {
|
|
11
|
+
config = originalWebpack(config, context);
|
|
12
|
+
}
|
|
13
|
+
if (context.dev && context.isServer) {
|
|
14
|
+
config.module?.rules?.unshift({
|
|
15
|
+
enforce: 'pre',
|
|
16
|
+
test: /\.(tsx|ts|jsx|js)$/,
|
|
17
|
+
exclude: [/node_modules/, /\.next/, /\.git/],
|
|
18
|
+
use: [require.resolve('./virtual-css-loader')],
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
config.plugins?.push(new webpack_plugin_1.PlumeriaPlugin());
|
|
22
|
+
return config;
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@plumeria/next-plugin",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Plumeria Next.js plugin",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/zss-in-js/plumeria.git",
|
|
8
|
+
"directory": "packages/next-plugin"
|
|
9
|
+
},
|
|
10
|
+
"main": "dist/index.js",
|
|
11
|
+
"types": "dist/index.d.ts",
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"files": [
|
|
14
|
+
"dist/"
|
|
15
|
+
],
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "rimraf dist types && pnpm cjs",
|
|
18
|
+
"cjs": "tsc --project tsconfig.cjs.json"
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"@plumeria/webpack-plugin": "^0.4.0"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@types/webpack": "^5.28.5",
|
|
25
|
+
"next": "15.4.6"
|
|
26
|
+
},
|
|
27
|
+
"publishConfig": {
|
|
28
|
+
"access": "public"
|
|
29
|
+
}
|
|
30
|
+
}
|