@_linked/cli 1.25.2 → 1.27.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/CHANGELOG.md +78 -0
- package/lib/esm/cli-methods.d.ts +2 -4
- package/lib/esm/cli-methods.d.ts.map +1 -1
- package/lib/esm/cli-methods.js +24 -180
- package/lib/esm/cli-methods.js.map +1 -1
- package/lib/esm/cli.d.ts.map +1 -1
- package/lib/esm/cli.js +14 -30
- package/lib/esm/cli.js.map +1 -1
- package/lib/esm/commands/build-app.d.ts +5 -9
- package/lib/esm/commands/build-app.d.ts.map +1 -1
- package/lib/esm/commands/build-app.js +10 -13
- package/lib/esm/commands/build-app.js.map +1 -1
- package/lib/esm/commands/start.d.ts +1 -1
- package/lib/esm/commands/start.js +4 -4
- package/lib/esm/commands/start.js.map +1 -1
- package/lib/esm/index.d.ts +1 -5
- package/lib/esm/index.d.ts.map +1 -1
- package/lib/esm/index.js +0 -8
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/interfaces.d.ts +1 -40
- package/lib/esm/interfaces.d.ts.map +1 -1
- package/lib/esm/lifecycle.d.ts +77 -1
- package/lib/esm/lifecycle.d.ts.map +1 -1
- package/lib/esm/lifecycle.js +191 -10
- package/lib/esm/lifecycle.js.map +1 -1
- package/lib/esm/utils.js +1 -1
- package/lib/esm/utils.js.map +1 -1
- package/lib/esm/vite-config.js +3 -3
- package/lib/esm/vite-config.js.map +1 -1
- package/package.json +5 -25
- package/lib/esm/config-webpack-app.d.ts +0 -112
- package/lib/esm/config-webpack-app.d.ts.map +0 -1
- package/lib/esm/config-webpack-app.js +0 -392
- package/lib/esm/config-webpack-app.js.map +0 -1
- package/lib/esm/config-webpack.d.ts +0 -55
- package/lib/esm/config-webpack.d.ts.map +0 -1
- package/lib/esm/config-webpack.js +0 -374
- package/lib/esm/config-webpack.js.map +0 -1
- package/lib/esm/plugins/check-imports.d.ts +0 -2
- package/lib/esm/plugins/check-imports.d.ts.map +0 -1
- package/lib/esm/plugins/check-imports.js +0 -65
- package/lib/esm/plugins/check-imports.js.map +0 -1
- package/lib/esm/plugins/declaration-plugin.d.ts +0 -15
- package/lib/esm/plugins/declaration-plugin.d.ts.map +0 -1
- package/lib/esm/plugins/declaration-plugin.js +0 -246
- package/lib/esm/plugins/declaration-plugin.js.map +0 -1
- package/lib/esm/plugins/externalise-modules.d.ts +0 -7
- package/lib/esm/plugins/externalise-modules.d.ts.map +0 -1
- package/lib/esm/plugins/externalise-modules.js +0 -185
- package/lib/esm/plugins/externalise-modules.js.map +0 -1
- package/lib/esm/plugins/watch-run.d.ts +0 -5
- package/lib/esm/plugins/watch-run.d.ts.map +0 -1
- package/lib/esm/plugins/watch-run.js +0 -44
- package/lib/esm/plugins/watch-run.js.map +0 -1
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import TerserPlugin from 'terser-webpack-plugin';
|
|
2
|
-
import type { LinkedConfig } from './interfaces.js';
|
|
3
|
-
/**
|
|
4
|
-
* Converts a css class name to a unique scoped name (for CSS Modules)
|
|
5
|
-
* @param context
|
|
6
|
-
* @param currentFormat
|
|
7
|
-
* @param name
|
|
8
|
-
*/
|
|
9
|
-
declare function getLocalIdent(context: any, currentFormat: any, name: any): string;
|
|
10
|
-
export declare const getLinkedConfig: () => Promise<LinkedConfig>;
|
|
11
|
-
export declare const getWebpackAppConfig: () => Promise<{
|
|
12
|
-
mode: string;
|
|
13
|
-
devtool: string;
|
|
14
|
-
entry: string[];
|
|
15
|
-
watch: boolean;
|
|
16
|
-
output: {
|
|
17
|
-
path: string;
|
|
18
|
-
filename: string;
|
|
19
|
-
publicPath: string;
|
|
20
|
-
clean: boolean;
|
|
21
|
-
};
|
|
22
|
-
watchOptions: {
|
|
23
|
-
ignored: RegExp;
|
|
24
|
-
aggregateTimeout: number;
|
|
25
|
-
};
|
|
26
|
-
devServer: {
|
|
27
|
-
client: {
|
|
28
|
-
progress: boolean;
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
plugins: any[];
|
|
32
|
-
externals: {
|
|
33
|
-
[npmModule: string]: string;
|
|
34
|
-
};
|
|
35
|
-
module: {
|
|
36
|
-
rules: ({
|
|
37
|
-
test: RegExp;
|
|
38
|
-
use: (string | {
|
|
39
|
-
loader: string;
|
|
40
|
-
options: {
|
|
41
|
-
url: boolean;
|
|
42
|
-
importLoaders: number;
|
|
43
|
-
modules: {
|
|
44
|
-
mode: string;
|
|
45
|
-
getLocalIdent: typeof getLocalIdent;
|
|
46
|
-
auto: (resourcePath: string) => boolean;
|
|
47
|
-
};
|
|
48
|
-
postcssOptions?: undefined;
|
|
49
|
-
};
|
|
50
|
-
} | {
|
|
51
|
-
loader: string;
|
|
52
|
-
options: {
|
|
53
|
-
postcssOptions: {
|
|
54
|
-
plugins: any[];
|
|
55
|
-
};
|
|
56
|
-
url?: undefined;
|
|
57
|
-
importLoaders?: undefined;
|
|
58
|
-
modules?: undefined;
|
|
59
|
-
};
|
|
60
|
-
})[];
|
|
61
|
-
exclude?: undefined;
|
|
62
|
-
} | {
|
|
63
|
-
test: RegExp;
|
|
64
|
-
use: {
|
|
65
|
-
loader: string;
|
|
66
|
-
options: {
|
|
67
|
-
transpileOnly: boolean;
|
|
68
|
-
getCustomTransformers?: () => {
|
|
69
|
-
before: import("typescript").TransformerFactory<import("typescript").SourceFile>[];
|
|
70
|
-
};
|
|
71
|
-
};
|
|
72
|
-
}[];
|
|
73
|
-
exclude: RegExp;
|
|
74
|
-
})[];
|
|
75
|
-
};
|
|
76
|
-
optimization: {
|
|
77
|
-
minimize: boolean;
|
|
78
|
-
minimizer: TerserPlugin<{
|
|
79
|
-
keep_classnames: boolean;
|
|
80
|
-
}>[];
|
|
81
|
-
splitChunks: {
|
|
82
|
-
cacheGroups: {
|
|
83
|
-
defaultVendors: boolean;
|
|
84
|
-
default: boolean;
|
|
85
|
-
};
|
|
86
|
-
};
|
|
87
|
-
};
|
|
88
|
-
stats: {
|
|
89
|
-
chunks: boolean;
|
|
90
|
-
assets: boolean;
|
|
91
|
-
entrypoints: boolean;
|
|
92
|
-
children: boolean;
|
|
93
|
-
modules: boolean;
|
|
94
|
-
};
|
|
95
|
-
resolve: {
|
|
96
|
-
extensions: string[];
|
|
97
|
-
alias: {
|
|
98
|
-
[oldNpmPath: string]: string;
|
|
99
|
-
};
|
|
100
|
-
extensionAlias: {
|
|
101
|
-
'.js': string[];
|
|
102
|
-
'.jsx': string[];
|
|
103
|
-
};
|
|
104
|
-
};
|
|
105
|
-
cache: {
|
|
106
|
-
type: "filesystem";
|
|
107
|
-
} | {
|
|
108
|
-
type: "memory";
|
|
109
|
-
};
|
|
110
|
-
}>;
|
|
111
|
-
export {};
|
|
112
|
-
//# sourceMappingURL=config-webpack-app.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config-webpack-app.d.ts","sourceRoot":"","sources":["../../src/config-webpack-app.ts"],"names":[],"mappings":"AAMA,OAAO,YAAY,MAAM,uBAAuB,CAAC;AAIjD,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;AA2ElD;;;;;GAKG;AACH,iBAAS,aAAa,CAAC,OAAO,KAAA,EAAE,aAAa,KAAA,EAAE,IAAI,KAAA,UAGlD;AAED,eAAO,MAAM,eAAe,QAAa,OAAO,CAAC,YAAY,CA4D5D,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6CAqLO,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAyFd,YAAY;;cAChB,QAAQ;;EAElC,CAAC"}
|
|
@@ -1,392 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
import ReactRefreshWebpackPlugin from '@pmmmwh/react-refresh-webpack-plugin';
|
|
11
|
-
import chalk from 'chalk';
|
|
12
|
-
import fs from 'fs';
|
|
13
|
-
import MiniCssExtractPlugin from 'mini-css-extract-plugin';
|
|
14
|
-
import path from 'path';
|
|
15
|
-
import ReactRefreshTypeScript from 'react-refresh-typescript';
|
|
16
|
-
import TerserPlugin from 'terser-webpack-plugin';
|
|
17
|
-
import webpack from 'webpack';
|
|
18
|
-
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';
|
|
19
|
-
import { WebpackManifestPlugin } from 'webpack-manifest-plugin';
|
|
20
|
-
import { generateScopedName } from './utils.js';
|
|
21
|
-
import { LinkedFileStorage } from '@_linked/core/utils/LinkedFileStorage';
|
|
22
|
-
import postcssUrl from 'postcss-url';
|
|
23
|
-
const isProduction = process.env.NODE_ENV === 'production';
|
|
24
|
-
const isDevelopment = process.env.NODE_ENV === 'development';
|
|
25
|
-
const packageJson = JSON.parse(fs.readFileSync(path.resolve(process.cwd(), 'package.json'), 'utf-8'));
|
|
26
|
-
const cssModes = ['tailwind', 'postcss'];
|
|
27
|
-
class WatchRunPlugin {
|
|
28
|
-
apply(compiler) {
|
|
29
|
-
compiler.hooks.watchRun.tap('watchRun', (comp) => {
|
|
30
|
-
if (comp.modifiedFiles) {
|
|
31
|
-
const changedFiles = Array.from(comp.modifiedFiles);
|
|
32
|
-
console.log(chalk.magenta("Changed files sorted by 'modified time' stamps:"));
|
|
33
|
-
const entriesToCheck = [];
|
|
34
|
-
changedFiles.forEach((file) => {
|
|
35
|
-
try {
|
|
36
|
-
const stat = fs.statSync(file.toString());
|
|
37
|
-
console.log(` ${chalk.magenta(file)}`);
|
|
38
|
-
entriesToCheck.push({ path: file, mtime: stat.mtime });
|
|
39
|
-
if (stat.isDirectory()) {
|
|
40
|
-
const contents = fs.readdirSync(file.toString());
|
|
41
|
-
contents.forEach((name) => {
|
|
42
|
-
const fullPath = path.join(file.toString(), name);
|
|
43
|
-
try {
|
|
44
|
-
const innerStat = fs.statSync(fullPath);
|
|
45
|
-
//if less than 2 minutes ago...
|
|
46
|
-
if (innerStat.mtime > new Date(Date.now() - 2 * 60 * 1000)) {
|
|
47
|
-
entriesToCheck.push({
|
|
48
|
-
path: fullPath,
|
|
49
|
-
mtime: innerStat.mtime,
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
catch (e) {
|
|
54
|
-
entriesToCheck.push({
|
|
55
|
-
path: fullPath,
|
|
56
|
-
mtime: new Date(0),
|
|
57
|
-
error: e.message,
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
catch (err) {
|
|
64
|
-
entriesToCheck.push({
|
|
65
|
-
path: file,
|
|
66
|
-
mtime: new Date(0),
|
|
67
|
-
error: err.message,
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
entriesToCheck
|
|
72
|
-
.sort((a, b) => b.mtime - a.mtime)
|
|
73
|
-
.splice(0, 3)
|
|
74
|
-
.forEach((entry) => {
|
|
75
|
-
const label = entry.error
|
|
76
|
-
? `[error: ${entry.error}]`
|
|
77
|
-
: `[${entry.mtime.toISOString()}]`;
|
|
78
|
-
console.log(` ${entry.path} ${label}`);
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Converts a css class name to a unique scoped name (for CSS Modules)
|
|
86
|
-
* @param context
|
|
87
|
-
* @param currentFormat
|
|
88
|
-
* @param name
|
|
89
|
-
*/
|
|
90
|
-
function getLocalIdent(context, currentFormat, name) {
|
|
91
|
-
// return isProduction ? generateScopedNameProduction(name,context.resourcePath) : generateScopedName(name,context.resourcePath);
|
|
92
|
-
return generateScopedName(name, context.resourcePath);
|
|
93
|
-
}
|
|
94
|
-
export const getLinkedConfig = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
95
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
|
|
96
|
-
const linkedConfigPathJs = path.resolve(process.cwd(), 'linked.config.js');
|
|
97
|
-
const linkedConfigPathJson = path.resolve(process.cwd(), 'linked.config.json');
|
|
98
|
-
//default config
|
|
99
|
-
let config = {
|
|
100
|
-
//tailwind is default
|
|
101
|
-
cssMode: cssModes[0],
|
|
102
|
-
webpack: {
|
|
103
|
-
cache: true,
|
|
104
|
-
analyse: false,
|
|
105
|
-
},
|
|
106
|
-
server: {},
|
|
107
|
-
};
|
|
108
|
-
// Load from package.json or config files
|
|
109
|
-
let loaded;
|
|
110
|
-
if (typeof packageJson.linkedApp === 'object') {
|
|
111
|
-
loaded = packageJson.linkedApp;
|
|
112
|
-
}
|
|
113
|
-
else if (fs.existsSync(linkedConfigPathJs)) {
|
|
114
|
-
let linkedConfig = yield import(linkedConfigPathJs);
|
|
115
|
-
loaded = linkedConfig.default;
|
|
116
|
-
}
|
|
117
|
-
else if (fs.existsSync(linkedConfigPathJson)) {
|
|
118
|
-
loaded = JSON.parse(fs.readFileSync(linkedConfigPathJson, 'utf-8'));
|
|
119
|
-
}
|
|
120
|
-
// Backward compatibility: migrate flat structure to nested
|
|
121
|
-
if (loaded) {
|
|
122
|
-
config.cssMode = (_a = loaded.cssMode) !== null && _a !== void 0 ? _a : config.cssMode;
|
|
123
|
-
// Move webpack properties
|
|
124
|
-
config.webpack = {
|
|
125
|
-
cache: (_d = (_c = (_b = loaded.webpack) === null || _b === void 0 ? void 0 : _b.cache) !== null && _c !== void 0 ? _c : loaded.cacheWebpack) !== null && _d !== void 0 ? _d : true,
|
|
126
|
-
analyse: (_f = (_e = loaded.webpack) === null || _e === void 0 ? void 0 : _e.analyse) !== null && _f !== void 0 ? _f : loaded.analyse,
|
|
127
|
-
plugins: (_h = (_g = loaded.webpack) === null || _g === void 0 ? void 0 : _g.plugins) !== null && _h !== void 0 ? _h : loaded.plugins,
|
|
128
|
-
externals: (_k = (_j = loaded.webpack) === null || _j === void 0 ? void 0 : _j.externals) !== null && _k !== void 0 ? _k : loaded.externals,
|
|
129
|
-
alias: (_m = (_l = loaded.webpack) === null || _l === void 0 ? void 0 : _l.alias) !== null && _m !== void 0 ? _m : loaded.alias,
|
|
130
|
-
cssGlobalModulePaths: (_p = (_o = loaded.webpack) === null || _o === void 0 ? void 0 : _o.cssGlobalModulePaths) !== null && _p !== void 0 ? _p : loaded.cssGlobalModulePaths,
|
|
131
|
-
};
|
|
132
|
-
// Move server properties
|
|
133
|
-
config.server = {
|
|
134
|
-
multiCore: (_r = (_q = loaded.server) === null || _q === void 0 ? void 0 : _q.multiCore) !== null && _r !== void 0 ? _r : loaded.multiCore,
|
|
135
|
-
cachePaths: (_t = (_s = loaded.server) === null || _s === void 0 ? void 0 : _s.cachePaths) !== null && _t !== void 0 ? _t : loaded.cachePaths,
|
|
136
|
-
cacheTimeout: (_v = (_u = loaded.server) === null || _u === void 0 ? void 0 : _u.cacheTimeout) !== null && _v !== void 0 ? _v : loaded.cacheTimeout,
|
|
137
|
-
loadAppComponent: (_x = (_w = loaded.server) === null || _w === void 0 ? void 0 : _w.loadAppComponent) !== null && _x !== void 0 ? _x : loaded.loadAppComponent,
|
|
138
|
-
};
|
|
139
|
-
}
|
|
140
|
-
if (!cssModes.includes(config.cssMode)) {
|
|
141
|
-
console.warn('Invalid value for property cssMode. Should be one of: ' +
|
|
142
|
-
cssModes.join(', '));
|
|
143
|
-
process.exit();
|
|
144
|
-
}
|
|
145
|
-
return config;
|
|
146
|
-
});
|
|
147
|
-
export const getWebpackAppConfig = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
148
|
-
var _a, _b, _c, _d, _e, _f;
|
|
149
|
-
// set up the storage config for the app — tries the canonical
|
|
150
|
-
// backend-storage-config at app root first, then the legacy scripts/
|
|
151
|
-
// location, so older clones keep booting during the transition.
|
|
152
|
-
const cwd = process.cwd();
|
|
153
|
-
const candidates = [
|
|
154
|
-
// Iter4 canonical:
|
|
155
|
-
path.join(cwd, 'linked.backend.storage.ts'),
|
|
156
|
-
path.join(cwd, 'linked.backend.storage.js'),
|
|
157
|
-
// Iter3:
|
|
158
|
-
path.join(cwd, 'backend-storage-config.ts'),
|
|
159
|
-
path.join(cwd, 'backend-storage-config.js'),
|
|
160
|
-
path.join(cwd, 'scripts', 'backend-storage-config.js'),
|
|
161
|
-
// legacy:
|
|
162
|
-
path.join(cwd, 'scripts', 'storage-config.js'),
|
|
163
|
-
];
|
|
164
|
-
for (const candidate of candidates) {
|
|
165
|
-
if (fs.existsSync(candidate)) {
|
|
166
|
-
yield import(candidate);
|
|
167
|
-
break;
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
const accessURL = LinkedFileStorage.accessURL;
|
|
171
|
-
// set up the public path for the app
|
|
172
|
-
// for Capacitor apps (APP_ENV is set), use /bundles/ since Capacitor's webDir strips /public (see: capacitor.config.ts)
|
|
173
|
-
// for web server builds, use /public/bundles/ to match express.static()
|
|
174
|
-
const isCapacitorBuild = process.env.APP_ENV !== undefined;
|
|
175
|
-
const publicPath = isCapacitorBuild ? '' : '/public';
|
|
176
|
-
const bundlesPath = publicPath + '/bundles/';
|
|
177
|
-
// ASSET_PATH is used to load the assets from the correct path.
|
|
178
|
-
// - If ASSET_PATH is set in environment (app builds), use it directly.
|
|
179
|
-
// - In development we want a port-agnostic relative path so the bundle URLs
|
|
180
|
-
// work no matter which PORT the dev server binds to (browsers resolve
|
|
181
|
-
// relative URLs against window.location.origin). Baking SITE_ROOT into
|
|
182
|
-
// the publicPath was a footgun when scaffolded apps overrode PORT.
|
|
183
|
-
// - In production, use the absolute origin from accessURL (CDN, etc.).
|
|
184
|
-
const ASSET_PATH = process.env.ASSET_PATH ||
|
|
185
|
-
(isDevelopment ? bundlesPath : accessURL ? accessURL + bundlesPath : bundlesPath);
|
|
186
|
-
let config = yield getLinkedConfig();
|
|
187
|
-
let postcssPlugins = [];
|
|
188
|
-
if (config.cssMode === 'tailwind') {
|
|
189
|
-
// Tailwind v4 is configured via CSS directives (@config, @import, @theme)
|
|
190
|
-
// See theme.css for the main configuration
|
|
191
|
-
postcssPlugins.push(['@tailwindcss/postcss', {}]);
|
|
192
|
-
}
|
|
193
|
-
else {
|
|
194
|
-
// postcss mode: use postcss-nested to enable nesting of css + CSS Modules
|
|
195
|
-
postcssPlugins.push(['postcss-import', {}], [
|
|
196
|
-
'postcss-preset-env',
|
|
197
|
-
{
|
|
198
|
-
features: { 'nesting-rules': true },
|
|
199
|
-
},
|
|
200
|
-
]);
|
|
201
|
-
}
|
|
202
|
-
/**
|
|
203
|
-
* Rewrite CSS asset URLs for the web bundle while keeping native (Capacitor) paths intact.
|
|
204
|
-
*
|
|
205
|
-
* Examples that will now work transparently in CSS:
|
|
206
|
-
* url('/images/foo.svg') -> web: https://cdn/app/public/images/foo.svg
|
|
207
|
-
* -> native: /images/foo.svg (served from bundled webDir)
|
|
208
|
-
* url('./images/bar.png') -> web: https://cdn/app/public/images/bar.png
|
|
209
|
-
* url('/public/images/baz.png') -> web: https://cdn/app/public/images/baz.png
|
|
210
|
-
*
|
|
211
|
-
* Data-URIs and absolute http(s) URLs pass through untouched.
|
|
212
|
-
*/
|
|
213
|
-
postcssPlugins.push([
|
|
214
|
-
postcssUrl({
|
|
215
|
-
url: ({ url }) => {
|
|
216
|
-
if (!url || url.startsWith('data:')) {
|
|
217
|
-
return url;
|
|
218
|
-
}
|
|
219
|
-
// remove wrapping quotes added by postcss
|
|
220
|
-
let cleanedUrl = url.replace(/^['"]|['"]$/g, '').trim();
|
|
221
|
-
// skip absolute http(s) references
|
|
222
|
-
if (/^https?:\/\//i.test(cleanedUrl)) {
|
|
223
|
-
return cleanedUrl;
|
|
224
|
-
}
|
|
225
|
-
// remove leading ./ to normalise relative imports
|
|
226
|
-
if (cleanedUrl.startsWith('./')) {
|
|
227
|
-
cleanedUrl = cleanedUrl.slice(1);
|
|
228
|
-
}
|
|
229
|
-
// ensure a single leading slash
|
|
230
|
-
if (!cleanedUrl.startsWith('/')) {
|
|
231
|
-
cleanedUrl = `/${cleanedUrl}`;
|
|
232
|
-
}
|
|
233
|
-
// collapse optional /public prefix - CSS can freely use /images/... now
|
|
234
|
-
if (cleanedUrl.startsWith('/public/')) {
|
|
235
|
-
cleanedUrl = cleanedUrl.replace('/public/', '/');
|
|
236
|
-
}
|
|
237
|
-
// For Capacitor builds we keep the relative path (assets are bundled locally)
|
|
238
|
-
if (isCapacitorBuild) {
|
|
239
|
-
return cleanedUrl;
|
|
240
|
-
}
|
|
241
|
-
const baseUrl = (accessURL || '').replace(/\/$/, '');
|
|
242
|
-
return `${baseUrl}${publicPath}${cleanedUrl}`;
|
|
243
|
-
},
|
|
244
|
-
}),
|
|
245
|
-
]);
|
|
246
|
-
return {
|
|
247
|
-
mode: isProduction ? 'production' : 'development',
|
|
248
|
-
devtool: isProduction ? 'source-map' : 'eval-cheap-module-source-map',
|
|
249
|
-
entry: [
|
|
250
|
-
isDevelopment && 'webpack-hot-middleware/client',
|
|
251
|
-
path.resolve(process.cwd(), process.env.ENTRY_PATH ||
|
|
252
|
-
(process.env.SOURCE_PATH
|
|
253
|
-
? process.env.SOURCE_PATH + '/index.tsx'
|
|
254
|
-
: './src/index.tsx')),
|
|
255
|
-
].filter(Boolean),
|
|
256
|
-
watch: isDevelopment || ((_a = config.webpack) === null || _a === void 0 ? void 0 : _a.analyse),
|
|
257
|
-
output: {
|
|
258
|
-
path: path.resolve(process.cwd(), process.env.OUTPUT_PATH || './public/bundles'),
|
|
259
|
-
filename: '[name].bundle.js',
|
|
260
|
-
publicPath: ASSET_PATH,
|
|
261
|
-
clean: true,
|
|
262
|
-
},
|
|
263
|
-
watchOptions: {
|
|
264
|
-
//ignore everything except the src folder. ignore specific files in the src folder
|
|
265
|
-
ignored: /(^((?!src).)*$|\.d\.ts$|\.js\.map$|\.css\.json$|public|\.idea|[/\\]\..*)/,
|
|
266
|
-
aggregateTimeout: 500,
|
|
267
|
-
},
|
|
268
|
-
devServer: {
|
|
269
|
-
client: {
|
|
270
|
-
progress: false,
|
|
271
|
-
},
|
|
272
|
-
},
|
|
273
|
-
plugins: [
|
|
274
|
-
// new WatchRunPlugin(),
|
|
275
|
-
new MiniCssExtractPlugin({
|
|
276
|
-
ignoreOrder: true,
|
|
277
|
-
}),
|
|
278
|
-
new webpack.EnvironmentPlugin(Object.keys(process.env)),
|
|
279
|
-
isDevelopment && new ReactRefreshWebpackPlugin(),
|
|
280
|
-
isDevelopment && new webpack.HotModuleReplacementPlugin(),
|
|
281
|
-
((_b = config.webpack) === null || _b === void 0 ? void 0 : _b.analyse) && new BundleAnalyzerPlugin(),
|
|
282
|
-
new WebpackManifestPlugin({
|
|
283
|
-
fileName: 'manifest.json',
|
|
284
|
-
publicPath: ASSET_PATH,
|
|
285
|
-
writeToFileEmit: true,
|
|
286
|
-
filter: (file) => /\.(js|css)$/i.test(file.name),
|
|
287
|
-
}),
|
|
288
|
-
...(Array.isArray((_c = config.webpack) === null || _c === void 0 ? void 0 : _c.plugins) ? config.webpack.plugins : []),
|
|
289
|
-
].filter(Boolean),
|
|
290
|
-
externals: ((_d = config.webpack) === null || _d === void 0 ? void 0 : _d.externals) || {},
|
|
291
|
-
module: {
|
|
292
|
-
rules: [
|
|
293
|
-
{
|
|
294
|
-
test: /\.css$/,
|
|
295
|
-
use: [
|
|
296
|
-
MiniCssExtractPlugin.loader,
|
|
297
|
-
{
|
|
298
|
-
loader: 'css-loader',
|
|
299
|
-
options: {
|
|
300
|
-
url: false,
|
|
301
|
-
importLoaders: 2,
|
|
302
|
-
modules: {
|
|
303
|
-
mode: 'local',
|
|
304
|
-
getLocalIdent: getLocalIdent,
|
|
305
|
-
auto: (resourcePath) => {
|
|
306
|
-
//make sure this only applies to .module.css files, and not to tailwind
|
|
307
|
-
return (/\.module\.css$/i.test(resourcePath) &&
|
|
308
|
-
!/tailwind/i.test(resourcePath));
|
|
309
|
-
},
|
|
310
|
-
},
|
|
311
|
-
},
|
|
312
|
-
},
|
|
313
|
-
{
|
|
314
|
-
loader: 'postcss-loader',
|
|
315
|
-
options: {
|
|
316
|
-
postcssOptions: {
|
|
317
|
-
plugins: postcssPlugins,
|
|
318
|
-
},
|
|
319
|
-
},
|
|
320
|
-
},
|
|
321
|
-
],
|
|
322
|
-
},
|
|
323
|
-
{
|
|
324
|
-
test: /\.tsx?$/,
|
|
325
|
-
use: [
|
|
326
|
-
{
|
|
327
|
-
loader: 'ts-loader?' +
|
|
328
|
-
JSON.stringify({
|
|
329
|
-
compilerOptions: {
|
|
330
|
-
//this is required for dynamic imports & code splitting
|
|
331
|
-
module: 'esnext',
|
|
332
|
-
moduleResolution: 'node',
|
|
333
|
-
sourceMap: isDevelopment,
|
|
334
|
-
plugins: [{ name: 'typescript-plugin-css-modules' }],
|
|
335
|
-
},
|
|
336
|
-
}),
|
|
337
|
-
options: Object.assign(Object.assign({}, (isDevelopment
|
|
338
|
-
? {
|
|
339
|
-
getCustomTransformers: () => ({
|
|
340
|
-
before: [ReactRefreshTypeScript()],
|
|
341
|
-
}),
|
|
342
|
-
}
|
|
343
|
-
: {})), { transpileOnly: isProduction }),
|
|
344
|
-
},
|
|
345
|
-
],
|
|
346
|
-
exclude: /node_modules/,
|
|
347
|
-
},
|
|
348
|
-
],
|
|
349
|
-
},
|
|
350
|
-
optimization: {
|
|
351
|
-
minimize: isProduction,
|
|
352
|
-
minimizer: [
|
|
353
|
-
new TerserPlugin({
|
|
354
|
-
terserOptions: {
|
|
355
|
-
keep_classnames: true,
|
|
356
|
-
},
|
|
357
|
-
}),
|
|
358
|
-
],
|
|
359
|
-
splitChunks: {
|
|
360
|
-
cacheGroups: {
|
|
361
|
-
// Prevent CSS from being split into separate shared chunks
|
|
362
|
-
// Keep all CSS for a lazy-loaded route together in one file
|
|
363
|
-
// This prevents FOUC when lazy routes need multiple CSS chunks
|
|
364
|
-
defaultVendors: false,
|
|
365
|
-
default: false,
|
|
366
|
-
},
|
|
367
|
-
},
|
|
368
|
-
},
|
|
369
|
-
stats: {
|
|
370
|
-
chunks: false,
|
|
371
|
-
assets: true,
|
|
372
|
-
entrypoints: false,
|
|
373
|
-
children: true,
|
|
374
|
-
modules: false,
|
|
375
|
-
},
|
|
376
|
-
resolve: {
|
|
377
|
-
extensions: ['.tsx', '.ts', '.js', '.css', '.json'],
|
|
378
|
-
alias: ((_e = config.webpack) === null || _e === void 0 ? void 0 : _e.alias) || {},
|
|
379
|
-
extensionAlias: {
|
|
380
|
-
'.js': ['.tsx', '.ts', '.js'],
|
|
381
|
-
'.jsx': ['.tsx', '.jsx'],
|
|
382
|
-
},
|
|
383
|
-
// traceResolution: true
|
|
384
|
-
},
|
|
385
|
-
//Cache is now overwritten in LinkedServer based on config, the other value for type would be 'filesystem'
|
|
386
|
-
//see also https://webpack.js.org/configuration/other-options/#cache
|
|
387
|
-
cache: ((_f = config.webpack) === null || _f === void 0 ? void 0 : _f.cache)
|
|
388
|
-
? { type: 'filesystem' }
|
|
389
|
-
: { type: 'memory' },
|
|
390
|
-
};
|
|
391
|
-
});
|
|
392
|
-
//# sourceMappingURL=config-webpack-app.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config-webpack-app.js","sourceRoot":"","sources":["../../src/config-webpack-app.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,yBAAyB,MAAM,sCAAsC,CAAC;AAC7E,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,oBAAoB,MAAM,yBAAyB,CAAC;AA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AAE,CAAA,MAAA,MAAM,CAAC,OAAO,0CAAE,KAAK,KAAI,EAAE;YAClC,cAAc,EAAE;gBACd,KAAK,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC;gBAC7B,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;aACzB;YACD,wBAAwB;SACzB;QACD,0GAA0G;QAC1G,oEAAoE;QACpE,KAAK,EAAE,CAAA,MAAA,MAAM,CAAC,OAAO,0CAAE,KAAK;YAC1B,CAAC,CAAC,EAAC,IAAI,EAAE,YAA4B,EAAC;YACtC,CAAC,CAAC,EAAC,IAAI,EAAE,QAAoB,EAAC;KACjC,CAAC;AACJ,CAAC,CAAA,CAAC"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import type { AdjustedModuleConfig } from './interfaces.js';
|
|
2
|
-
import TerserPlugin from 'terser-webpack-plugin';
|
|
3
|
-
export declare function generateWebpackConfig(buildName: any, moduleName: any, config?: AdjustedModuleConfig): {
|
|
4
|
-
entry: any;
|
|
5
|
-
output: {
|
|
6
|
-
filename: string;
|
|
7
|
-
path: string;
|
|
8
|
-
devtoolModuleFilenameTemplate: string;
|
|
9
|
-
};
|
|
10
|
-
devtool: string;
|
|
11
|
-
mode: string;
|
|
12
|
-
resolve: {
|
|
13
|
-
extensions: string[];
|
|
14
|
-
alias: {
|
|
15
|
-
[oldNpmPath: string]: string;
|
|
16
|
-
};
|
|
17
|
-
fallback: {
|
|
18
|
-
crypto: boolean;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
resolveLoader: {
|
|
22
|
-
modules: string[];
|
|
23
|
-
};
|
|
24
|
-
optimization: {
|
|
25
|
-
minimize: boolean;
|
|
26
|
-
minimizer: TerserPlugin<import("terser").MinifyOptions>[];
|
|
27
|
-
};
|
|
28
|
-
watch: boolean;
|
|
29
|
-
watchOptions: {
|
|
30
|
-
ignored: string[];
|
|
31
|
-
aggregateTimeout: number;
|
|
32
|
-
};
|
|
33
|
-
module: {
|
|
34
|
-
rules: any[];
|
|
35
|
-
};
|
|
36
|
-
externals: ({ context, request, contextInfo }: {
|
|
37
|
-
context: any;
|
|
38
|
-
request: any;
|
|
39
|
-
contextInfo: any;
|
|
40
|
-
}, callback: any) => any;
|
|
41
|
-
plugins: any[];
|
|
42
|
-
stats: {
|
|
43
|
-
errorDetails: boolean;
|
|
44
|
-
chunks: boolean;
|
|
45
|
-
children: boolean;
|
|
46
|
-
version: boolean;
|
|
47
|
-
hash: boolean;
|
|
48
|
-
entrypoints: boolean;
|
|
49
|
-
modules: boolean;
|
|
50
|
-
};
|
|
51
|
-
cache: {
|
|
52
|
-
type: string;
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
|
-
//# sourceMappingURL=config-webpack.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config-webpack.d.ts","sourceRoot":"","sources":["../../src/config-webpack.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,iBAAiB,CAAC;AAgB1D,OAAO,YAAY,MAAM,uBAAuB,CAAC;AAkCjD,wBAAgB,qBAAqB,CACnC,SAAS,KAAA,EACT,UAAU,KAAA,EACV,MAAM,GAAE,oBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmXlC"}
|