@evjs/cli 0.0.4 → 0.0.6

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 CHANGED
@@ -50,7 +50,7 @@ export default defineConfig({
50
50
  client: {
51
51
  entry: "./src/main.tsx",
52
52
  html: "./index.html",
53
- plugins: [{ name: "tailwind", loaders: [{ test: /\.css$/, use: ["style-loader", "css-loader", "postcss-loader"] }] }],
53
+ plugins: [{ name: "tailwind", module: { rules: [{ test: /\.css$/, use: ["style-loader", "css-loader", "postcss-loader"] }] } }],
54
54
  dev: { port: 3000 },
55
55
  },
56
56
  server: {
package/dist/config.d.ts CHANGED
@@ -58,8 +58,8 @@ export type EvLoaderEntry = string | {
58
58
  loader: string;
59
59
  options?: Record<string, unknown>;
60
60
  };
61
- /** A loader rule declared by a plugin. */
62
- export interface EvPluginLoader {
61
+ /** A module rule declared by a plugin. */
62
+ export interface EvModuleRule {
63
63
  /** File matching pattern (e.g. /\.css$/, /\.svg$/). */
64
64
  test: RegExp;
65
65
  /** Pattern to exclude (e.g. /node_modules/). */
@@ -71,8 +71,11 @@ export interface EvPluginLoader {
71
71
  export interface EvPlugin {
72
72
  /** Plugin name for debugging and logging. */
73
73
  name: string;
74
- /** Loaders to add to the build pipeline. */
75
- loaders?: EvPluginLoader[];
74
+ /** Plugin's module configuration. */
75
+ module?: {
76
+ /** Module rules to add to the build pipeline. */
77
+ rules?: EvModuleRule[];
78
+ };
76
79
  }
77
80
  /**
78
81
  * evjs framework configuration.
@@ -74,8 +74,8 @@ export function createWebpackConfig(config, cwd) {
74
74
  },
75
75
  ],
76
76
  },
77
- // Plugin-declared loaders (client + server)
78
- ...[...(client?.plugins ?? []), ...(server?.plugins ?? [])].flatMap((plugin) => (plugin.loaders ?? []).map((rule) => {
77
+ // Plugin-declared module rules (client + server)
78
+ ...[...(client?.plugins ?? []), ...(server?.plugins ?? [])].flatMap((plugin) => (plugin.module?.rules ?? []).map((rule) => {
79
79
  const entries = Array.isArray(rule.use) ? rule.use : [rule.use];
80
80
  return {
81
81
  test: rule.test,
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { EvConfig } from "./config.js";
2
- export type { ClientConfig, EvConfig, EvLoaderEntry, EvPlugin, EvPluginLoader, ServerConfig, } from "./config.js";
2
+ export type { ClientConfig, EvConfig, EvLoaderEntry, EvModuleRule, EvPlugin, ServerConfig, } from "./config.js";
3
3
  export { CONFIG_DEFAULTS, defineConfig } from "./config.js";
4
4
  export interface DevOptions {
5
5
  cwd?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evjs/cli",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "description": "CLI and configuration layer for the evjs framework",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",