@cocreate/webpack 1.4.3 → 1.6.1

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.
@@ -1,8 +1,10 @@
1
1
  name: Automated Workflow
2
+
2
3
  on:
3
4
  push:
4
5
  branches:
5
6
  - master
7
+
6
8
  jobs:
7
9
  about:
8
10
  runs-on: ubuntu-latest
@@ -18,26 +20,37 @@ jobs:
18
20
  with:
19
21
  direction: overwrite-github
20
22
  githubToken: "${{ secrets.GITHUB }}"
23
+
21
24
  release:
22
25
  runs-on: ubuntu-latest
23
26
  steps:
24
27
  - name: Checkout
25
28
  uses: actions/checkout@v4
29
+ with:
30
+ fetch-depth: 0 # Required so semantic-release can trace git tags/history
31
+
26
32
  - name: Setup Node.js
27
33
  uses: actions/setup-node@v4
28
34
  with:
29
- node-version: 22 # Required for the latest semantic-release plugins
30
- - name: Semantic Release
31
- uses: cycjimmy/semantic-release-action@v4 # Update to v4 for better Node 20+ support
32
- id: semantic
33
- with:
34
- extra_plugins: |
35
- @semantic-release/changelog
35
+ node-version: 22
36
+
37
+ - name: Install Semantic Release & Plugins
38
+ # Installs semantic-release and its plugins on the runner
39
+ run: |
40
+ npm install -g semantic-release \
41
+ @semantic-release/changelog \
42
+ @semantic-release/npm \
43
+ @semantic-release/github \
36
44
  @semantic-release/git
37
- @semantic-release/github
45
+
46
+ - name: Run Semantic Release (Native)
47
+ id: semantic
48
+ # This will automatically pick up your export default config file in the repository root
49
+ run: npx semantic-release
38
50
  env:
39
- GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" # Use the built-in token if possible
51
+ GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
40
52
  NPM_TOKEN: "${{ secrets.NPM_TOKEN }}"
53
+
41
54
  outputs:
42
55
  new_release_published: "${{ steps.semantic.outputs.new_release_published }}"
43
- new_release_version: "${{ steps.semantic.outputs.new_release_version }}"
56
+ new_release_version: "${{ steps.semantic.outputs.new_release_version }}"
@@ -14,8 +14,7 @@ jobs:
14
14
  env:
15
15
  DRY_RUN: ${{ github.event.inputs.dry_run }}
16
16
  GITHUB_TOKEN: "${{ secrets.GITHUB }}"
17
- NPM_TOKEN: "${{ secrets.NPM_TOKEN }}"
18
-
17
+
19
18
  steps:
20
19
  - name: Checkout
21
20
  uses: actions/checkout@v3
package/CHANGELOG.md CHANGED
@@ -1,3 +1,33 @@
1
+ ## [1.6.1](https://github.com/CoCreate-app/CoCreate-webpack/compare/v1.6.0...v1.6.1) (2026-07-17)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * bump dependencies ([9101dab](https://github.com/CoCreate-app/CoCreate-webpack/commit/9101dab888a68db506b46ace777ab4cb2a0a27f3))
7
+ * update dependencies to latest versions for improved stability and performance ([6ae8db7](https://github.com/CoCreate-app/CoCreate-webpack/commit/6ae8db7797fe8f1099961c8ba678110d08e43e67))
8
+
9
+ # [1.6.0](https://github.com/CoCreate-app/CoCreate-webpack/compare/v1.5.0...v1.6.0) (2026-07-17)
10
+
11
+
12
+ ### Features
13
+
14
+ * update automated workflow and release configuration for improved semantic release handling ([3ba7b27](https://github.com/CoCreate-app/CoCreate-webpack/commit/3ba7b274d241ecebd50e96723b685808b3444cbb))
15
+
16
+ # [1.5.0](https://github.com/CoCreate-app/CoCreate-webpack/compare/v1.4.3...v1.5.0) (2026-07-11)
17
+
18
+
19
+ ### Bug Fixes
20
+
21
+ * remove devDependencies ([c430e68](https://github.com/CoCreate-app/CoCreate-webpack/commit/c430e685803c28b386d8b899348b04f8019e795a))
22
+ * remove postinstall script and ensure dependencies are correctly listed in package.json ([f851cd7](https://github.com/CoCreate-app/CoCreate-webpack/commit/f851cd764023e56f33c7bd251ea97f1afd14b295))
23
+ * removed post install and add add packages to apprved list ([601dda4](https://github.com/CoCreate-app/CoCreate-webpack/commit/601dda4b5a7503262fc8ac35bd8fc0645e18486c))
24
+ * semantic version handling ([2e79c82](https://github.com/CoCreate-app/CoCreate-webpack/commit/2e79c82340d6e87d6b6dda20c781cbafd01a14fb))
25
+
26
+
27
+ ### Features
28
+
29
+ * update ModuleGenerator to use pluginOptions and improve error handling ([af6db28](https://github.com/CoCreate-app/CoCreate-webpack/commit/af6db28d6f0dde3906b424dea975726ddfcf2101))
30
+
1
31
  ## [1.4.3](https://github.com/CoCreate-app/CoCreate-webpack/compare/v1.4.2...v1.4.3) (2026-02-04)
2
32
 
3
33
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/webpack",
3
- "version": "1.4.3",
3
+ "version": "1.6.1",
4
4
  "description": "A Webpack integration tool for CoCreate applications, enabling file watching, automated chunking, lazy loading, and file uploading. It leverages CoCreate.config for streamlined project builds and development workflows.",
5
5
  "keywords": [
6
6
  "webpack",
@@ -21,10 +21,9 @@
21
21
  "access": "public"
22
22
  },
23
23
  "scripts": {
24
- "start": "npx webpack --config webpack.config.js",
25
- "build": "npx webpack --mode=production --config webpack.config.js",
26
- "dev": "npx webpack --config webpack.config.js --watch",
27
- "postinstall": "node -e \"const { execSync } = require('child_process'); try { execSync('coc --version', { stdio: 'ignore' }); } catch (error) { try { execSync('npm install -g @cocreate/cli', { stdio: 'inherit' }); console.log('Installed \"@cocreate/cli\" globally.'); } catch (error) { console.error('Failed to install \"@cocreate/cli\" globally:', error); } }\""
24
+ "start": "webpack --config webpack.config.js",
25
+ "build": "webpack --mode=production --config webpack.config.js",
26
+ "dev": "webpack --config webpack.config.js --watch"
28
27
  },
29
28
  "repository": {
30
29
  "type": "git",
@@ -40,5 +39,42 @@
40
39
  "type": "GitHub Sponsors ❤",
41
40
  "url": "https://github.com/sponsors/CoCreate-app"
42
41
  },
43
- "main": "./src/index.js"
42
+ "main": "./src/index.js",
43
+ "dependencies": {
44
+ "@cocreate/cli": "^1.56.1",
45
+ "css-loader": "^7.1.4",
46
+ "esbuild": "^0.25.12",
47
+ "esbuild-loader": "^4.5.0",
48
+ "mini-css-extract-plugin": "^1.6.2",
49
+ "sass": "^1.101.0",
50
+ "sass-loader": "^16.0.8",
51
+ "webpack": "^5.108.4",
52
+ "webpack-bundle-analyzer": "^4.10.2",
53
+ "webpack-cli": "^4.10.0",
54
+ "webpack-log": "^3.0.2",
55
+ "webpack-node-externals": "^3.0.0"
56
+ },
57
+ "allowScripts": {
58
+ "@cocreate/acme@1.3.2": true,
59
+ "@cocreate/actions@1.21.4": true,
60
+ "@cocreate/api@1.22.5": true,
61
+ "@cocreate/config@1.13.4": true,
62
+ "@cocreate/crud-client@1.34.6": true,
63
+ "@cocreate/element-prototype@1.31.4": true,
64
+ "@cocreate/elements@1.42.9": true,
65
+ "@cocreate/filter@1.33.6": true,
66
+ "@cocreate/indexeddb@1.23.4": true,
67
+ "@cocreate/local-storage@1.16.5": true,
68
+ "@cocreate/nginx@1.4.4": true,
69
+ "@cocreate/observer@1.19.0": true,
70
+ "@cocreate/organizations@1.30.1": true,
71
+ "@cocreate/render@1.46.1": true,
72
+ "@cocreate/socket-client@1.40.5": true,
73
+ "@cocreate/utils@1.42.2": true,
74
+ "@cocreate/uuid@1.12.4": true,
75
+ "@cocreate/webpack@1.4.3": true,
76
+ "@parcel/watcher@2.5.6": true,
77
+ "esbuild@0.25.12": true,
78
+ "esbuild@0.28.1": true
79
+ }
44
80
  }
package/release.config.js CHANGED
@@ -10,12 +10,20 @@ module.exports = {
10
10
  changelogFile: "CHANGELOG.md",
11
11
  },
12
12
  ],
13
- "@semantic-release/npm",
14
- "@semantic-release/github",
13
+ "@semantic-release/npm",
15
14
  [
16
- "@semantic-release/git",
15
+ "@semantic-release/github",
17
16
  {
17
+ successComment: false,
18
+ failTitle: false,
19
+ },
20
+ ],
21
+ [
22
+ "@semantic-release/git",
23
+ {
24
+ // Only stage and commit the changelog and package.json
18
25
  assets: ["CHANGELOG.md", "package.json"],
26
+ message: "chore(release): ${nextRelease.version} [skip ci]",
19
27
  },
20
28
  ],
21
29
  ],
package/src/index.js CHANGED
@@ -1,194 +1,224 @@
1
- // Import 'fs' for file system operations and 'path' for path operations
1
+ /**
2
+ * @fileoverview Webpack plugins and loaders for the CoCreate ecosystem.
3
+ * Includes module generation, automated file uploading, and symlink management.
4
+ */
5
+
2
6
  const fs = require("fs");
3
7
  const path = require("path");
4
8
 
5
- // Import 'upload' function from CoCreate CLI to handle uploads
9
+ /**
10
+ * Import the upload function from CoCreate CLI to handle automated file uploads.
11
+ * This function synchronizes local changes with the CoCreate cloud environment.
12
+ */
6
13
  const upload = require("@cocreate/cli/src/commands/upload.js");
7
14
 
8
15
  /**
9
- * Class representing a Module Generator.
10
- * Generates module files based on a configuration and applies them to the Webpack compiler.
16
+ * @class ModuleGenerator
17
+ * @description A Webpack plugin that dynamically generates a module entry file
18
+ * (typically `CoCreate.modules.js`) based on a configuration object. It leverages
19
+ * `@cocreate/lazy-loader` for efficient code splitting and dependency management.
11
20
  */
12
21
  class ModuleGenerator {
13
- /**
14
- * Creates an instance of ModuleGenerator.
15
- * @param {Object} modulesConfig - The configuration for the modules.
16
- */
17
- constructor(modulesConfig) {
18
- this.modulesConfig = modulesConfig;
19
- }
20
-
21
- /**
22
- * Apply the module generation process to the Webpack compiler.
23
- * @param {Object} compiler - The Webpack compiler instance.
24
- */
25
- apply(compiler) {
26
- let CoCreateConfig;
27
-
28
- if (typeof this.modulesConfig === "object") {
29
- CoCreateConfig = this.modulesConfig.config;
30
- } else {
31
- try {
32
- CoCreateConfig = require(this.modulesConfig.configPath);
33
- } catch (error) {
34
- console.error("Error loading CoCreate.config.js:", error);
35
- throw error; // Stop the compilation process if configuration is critical
36
- }
37
- }
38
-
39
- let modulesGenerated = false;
40
-
41
- compiler.hooks.beforeCompile.tapAsync(
42
- "CoCreateLazyloader",
43
- (params, callback) => {
44
- if (modulesGenerated) callback();
45
- else {
46
- let outputPath =
47
- this.modulesConfig.outputPath || "./modules.js"; // Default path for generated module.js
48
-
49
- // Generate module content based on CoCreateConfig
50
- let moduleContent = `import { dependency, lazyLoad } from '@cocreate/lazy-loader';\n\n`;
51
- Object.entries(this.modulesConfig).forEach(
52
- ([moduleName, moduleInfo]) => {
53
- if (
54
- moduleName === "outputPath" ||
55
- typeof moduleInfo !== "object"
56
- )
57
- return;
58
-
59
- if (moduleInfo.selector) {
60
- // Generate lazyLoad statements for modules with selectors
61
- moduleInfo.selector =
62
- moduleInfo.selector.replaceAll("'", '"');
63
- moduleContent += `lazyLoad('${moduleName}', '${moduleInfo.selector}', () => import(/*webpackChunkName: "${moduleName}-chunk"*/ '${moduleInfo.import}'));\n`;
64
- } else {
65
- // Generate dependency statements for other modules
66
- moduleContent += `dependency('${moduleName}', import(/*webpackChunkName: "${moduleName}-chunk"*/ '${moduleInfo.import}'));\n`;
67
- }
68
- }
69
- );
70
-
71
- // Write the module content to the specified outputPath
72
- fs.writeFile(outputPath, moduleContent, (err) => {
73
- if (err) {
74
- console.error(`Error writing ${outputPath}:`, err);
75
- callback(err); // Handle errors in async hook
76
- } else {
77
- modulesGenerated = true;
78
- console.log(
79
- `${outputPath} generated successfully.`
80
- );
81
- callback(); // Proceed with compilation
82
- }
83
- });
84
- }
85
- }
86
- );
87
- }
22
+ /**
23
+ * @constructor
24
+ * @param {Object} pluginOptions - The configuration for the plugin.
25
+ * @param {Object} [pluginOptions.config] - Direct CoCreate configuration object.
26
+ * @param {string} [pluginOptions.configPath] - Path to a CoCreate config file.
27
+ */
28
+ constructor(pluginOptions) {
29
+ /** @type {Object} */
30
+ this.pluginOptions = pluginOptions;
31
+ }
32
+
33
+ /**
34
+ * @method apply
35
+ * @description Entry point for the Webpack plugin. Taps into the `beforeCompile` hook.
36
+ * @param {import('webpack').Compiler} compiler - The Webpack compiler instance.
37
+ */
38
+ apply(compiler) {
39
+ let CoCreateConfig;
40
+
41
+ // Resolve configuration source
42
+ if (typeof this.pluginOptions === "object") {
43
+ CoCreateConfig = this.pluginOptions;
44
+ } else if (this.pluginOptions && this.pluginOptions.configPath) {
45
+ try {
46
+ CoCreateConfig = require(this.pluginOptions.configPath);
47
+ } catch (error) {
48
+ console.error("Error loading CoCreate config file:", error);
49
+ throw error;
50
+ }
51
+ } else {
52
+ console.error("ModuleGenerator requires either a 'config' object or 'configPath' string.");
53
+ return;
54
+ }
55
+
56
+ /** @type {boolean} Track if modules have already been generated to avoid redundant writes. */
57
+ let modulesGenerated = false;
58
+
59
+ compiler.hooks.beforeCompile.tapAsync(
60
+ "CoCreateLazyloader",
61
+ (params, callback) => {
62
+ if (modulesGenerated) {
63
+ callback();
64
+ } else {
65
+ // Fetch the output path from the root of the config, with a fallback
66
+ const outputPath = this.pluginOptions.moduleOutputPath || "./CoCreate.modules.js";
67
+ let moduleContent = `import { dependency, lazyLoad } from '@cocreate/lazy-loader';\n\n`;
68
+
69
+ // Ensure we are explicitly targeting the 'modules' namespace
70
+ const modulesObj = CoCreateConfig.modules || {};
71
+
72
+ // Generate import statements based on module metadata
73
+ Object.entries(modulesObj).forEach(
74
+ ([moduleName, moduleInfo]) => {
75
+ // Skip non-objects
76
+ if (typeof moduleInfo !== "object" || moduleInfo === null) return;
77
+
78
+ // Skip items that do not have an import defined (acts as 'continue' in forEach)
79
+ if (!moduleInfo.import) return;
80
+
81
+ if (moduleInfo.selector) {
82
+ // Logic for lazy-loading based on DOM selectors
83
+ const sanitizedSelector = moduleInfo.selector.replaceAll("'", '"');
84
+ moduleContent += `lazyLoad('${moduleName}', '${sanitizedSelector}', () => import(/*webpackChunkName: "${moduleName}-chunk"*/ '${moduleInfo.import}'));\n`;
85
+ } else {
86
+ // Logic for standard dependencies
87
+ moduleContent += `dependency('${moduleName}', import(/*webpackChunkName: "${moduleName}-chunk"*/ '${moduleInfo.import}'));\n`;
88
+ }
89
+ }
90
+ );
91
+
92
+ // Persist the generated module file to disk
93
+ fs.writeFile(outputPath, moduleContent, (err) => {
94
+ if (err) {
95
+ console.error(`Error writing ${outputPath}:`, err);
96
+ callback(err);
97
+ } else {
98
+ modulesGenerated = true;
99
+ console.log(`${outputPath} generated successfully.`);
100
+ callback();
101
+ }
102
+ });
103
+ }
104
+ }
105
+ );
106
+ }
88
107
  }
89
108
 
90
109
  /**
91
- * Class to handle file uploads, particularly useful during watch mode.
110
+ * @class FileUploader
111
+ * @description Handles automated file uploads to the CoCreate platform,
112
+ * primarily intended for use during Webpack's 'watch' mode to sync local changes.
92
113
  */
93
114
  class FileUploader {
94
- /**
95
- * Creates an instance of FileUploader.
96
- * @param {Object} env - The environment variables.
97
- * @param {Object} argv - The arguments provided.
98
- */
99
- constructor(env, argv) {
100
- this.env = env;
101
- this.isWatching = false;
102
- this.isWatch = argv.watch === true;
103
- }
104
-
105
- /**
106
- * Apply the file uploader process to the Webpack compiler.
107
- * @param {Object} compiler - The Webpack compiler instance.
108
- */
109
- apply(compiler) {
110
- if (this.isWatch) {
111
- if (this.env.beforeCompilation) {
112
- // Directly perform upload here
113
- upload(process.cwd(), ["../", "-w"]);
114
- }
115
-
116
- if (this.env.afterCompilation) {
117
- compiler.hooks.emit.tapAsync(
118
- "watchFiles",
119
- (compilation, callback) => {
120
- if (!this.isWatching) {
121
- this.isWatching = true;
122
- upload(process.cwd(), ["../", "-w"]);
123
- }
124
- callback();
125
- }
126
- );
127
- }
128
- }
129
- }
115
+ /**
116
+ * @constructor
117
+ * @param {Object} env - Environment variables passed from the Webpack CLI.
118
+ * @param {Object} argv - Command line arguments (used to detect --watch).
119
+ */
120
+ constructor(env, argv) {
121
+ /** @type {Object} */
122
+ this.env = env;
123
+ /** @type {boolean} Internal state to prevent multiple upload triggers. */
124
+ this.isWatching = false;
125
+ /** @type {boolean} Flag indicating if Webpack is in watch mode. */
126
+ this.isWatch = argv.watch === true;
127
+ }
128
+
129
+ /**
130
+ * @method apply
131
+ * @description Hooks into the compilation process to trigger uploads.
132
+ * @param {import('webpack').Compiler} compiler - The Webpack compiler instance.
133
+ */
134
+ apply(compiler) {
135
+ if (this.isWatch) {
136
+ // Optional: Upload files before the first compilation starts
137
+ if (this.env.beforeCompilation) {
138
+ upload(process.cwd(), ["../", "-w"]);
139
+ }
140
+
141
+ // Upload files after assets are emitted to the output directory
142
+ if (this.env.afterCompilation) {
143
+ compiler.hooks.emit.tapAsync(
144
+ "watchFiles",
145
+ (compilation, callback) => {
146
+ if (!this.isWatching) {
147
+ this.isWatching = true;
148
+ upload(process.cwd(), ["../", "-w"]);
149
+ }
150
+ callback();
151
+ }
152
+ );
153
+ }
154
+ }
155
+ }
130
156
  }
131
157
 
132
158
  /**
133
- * Class responsible for creating symbolic links after the build process.
159
+ * @class SymlinkCreator
160
+ * @description A utility plugin that creates symbolic links after the build process.
161
+ * This is used to map PWA assets and distribution folders to the project root.
134
162
  */
135
163
  class SymlinkCreator {
136
- /**
137
- * Creates an instance of SymlinkCreator.
138
- * @param {Object} [options] - Optional configurations for symlink creation.
139
- */
140
- constructor(options) {
141
- // Store options if necessary, or just hard-code paths
142
- }
143
-
144
- /**
145
- * Apply the symlink creation process to the Webpack compiler.
146
- * @param {Object} compiler - The Webpack compiler instance.
147
- */
148
- apply(compiler) {
149
- // Use compiler.hooks to tap into the Webpack build process
150
- compiler.hooks.afterEmit.tap("SymlinkPlugin", (compilation) => {
151
- // Perform symlink operations here
152
- symlink("./dist", "../dist", "dir");
153
- symlink(
154
- "./node_modules/@cocreate/pwa/src/service-worker.js",
155
- "../service-worker.js",
156
- "file"
157
- );
158
- symlink(
159
- "./node_modules/@cocreate/pwa/src/manifest.webmanifest",
160
- "../manifest.webmanifest",
161
- "file"
162
- );
163
- symlink(
164
- "./node_modules/@cocreate/pwa/src/offline.html",
165
- "../offline.html",
166
- "file"
167
- );
168
- });
169
-
170
- /**
171
- * Function to create a symlink if the target exists and the destination does not.
172
- * @param {string} target - Path to the target.
173
- * @param {string} destination - Path to the destination.
174
- * @param {string} option - Type of symlink ('file' or 'dir').
175
- */
176
- function symlink(target, destination, option) {
177
- if (fs.existsSync(target)) {
178
- target = path.resolve(target);
179
-
180
- if (!fs.existsSync(destination)) {
181
- destination = path.resolve(destination);
182
-
183
- fs.symlink(target, destination, option, (err) => {
184
- if (err) console.log(err);
185
- else console.log("symlink added: ", target);
186
- });
187
- }
188
- }
189
- }
190
- }
164
+ /**
165
+ * @constructor
166
+ * @param {Object} [options] - Configuration options for symlink behavior.
167
+ */
168
+ constructor(options) {
169
+ /** @type {Object|undefined} */
170
+ this.options = options;
171
+ }
172
+
173
+ /**
174
+ * @method apply
175
+ * @description Taps into the `afterEmit` hook to create symlinks once files are generated.
176
+ * @param {import('webpack').Compiler} compiler - The Webpack compiler instance.
177
+ */
178
+ apply(compiler) {
179
+ compiler.hooks.afterEmit.tap("SymlinkPlugin", (compilation) => {
180
+ // Standard symlink mappings for CoCreate PWA structure
181
+ // this.createSymlink("./dist", "../dist", "dir");
182
+ // this.createSymlink("./node_modules/@cocreate/pwa/src/service-worker.js", "../service-worker.js", "file");
183
+ // this.createSymlink("./node_modules/@cocreate/pwa/src/manifest.webmanifest", "../manifest.webmanifest", "file");
184
+ // this.createSymlink("./node_modules/@cocreate/pwa/src/offline.html", "../offline.html", "file");
185
+ });
186
+ }
187
+
188
+ /**
189
+ * @method createSymlink
190
+ * @description Helper method to safely create a symlink if the target exists and the destination is free.
191
+ * @param {string} target - The source path (relative or absolute).
192
+ * @param {string} destination - The target link path (relative or absolute).
193
+ * @param {string} type - The type of symlink ('file', 'dir', or 'junction').
194
+ */
195
+ createSymlink(target, destination, type) {
196
+ if (fs.existsSync(target)) {
197
+ const absoluteTarget = path.resolve(target);
198
+ if (!fs.existsSync(destination)) {
199
+ const absoluteDestination = path.resolve(destination);
200
+ fs.symlink(absoluteTarget, absoluteDestination, type, (err) => {
201
+ if (err) {
202
+ console.error(`Failed to create symlink at ${destination}:`, err);
203
+ } else {
204
+ console.log(`Symlink created: ${target} -> ${destination}`);
205
+ }
206
+ });
207
+ }
208
+ }
209
+ }
191
210
  }
192
211
 
193
- // Export the defined classes so they can be used in other modules or configurations
194
- module.exports = { ModuleGenerator, FileUploader, SymlinkCreator };
212
+ /**
213
+ * @exports
214
+ * @property {ModuleGenerator} ModuleGenerator - Dynamic module builder plugin.
215
+ * @property {FileUploader} FileUploader - CLI upload integration plugin.
216
+ * @property {SymlinkCreator} SymlinkCreator - PWA/dist symlink management plugin.
217
+ * @property {string} UnicodeLoader - Absolute path to the unicode replacement loader.
218
+ */
219
+ module.exports = {
220
+ ModuleGenerator,
221
+ FileUploader,
222
+ SymlinkCreator,
223
+ UnicodeLoader: path.resolve(__dirname, 'replace-unicode.js')
224
+ };
@@ -1,6 +1,9 @@
1
1
  module.exports = function (source) {
2
- return source.replace(/\$'/g, '\\u0024\'');
2
+ let modifiedSource = source.replace(/\$'/g, '\\u0024\'');
3
+ // console.log("Modified source code:", modifiedSource);
4
+ return modifiedSource;
3
5
 
6
+
4
7
  // const specialChars = /[\0\x08\x09\x1a\n\r"'\\\%\$]/g; // Add or remove characters based on your needs
5
8
  // const replacements = {
6
9
  // // "\0": "\\0",