@ms-cloudpack/bundler-rollup 0.5.4 → 0.5.5
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/lib/getRollupOptions.d.ts.map +1 -1
- package/lib/getRollupOptions.js +2 -12
- package/lib/getRollupOptions.js.map +1 -1
- package/lib/getRollupPlugins.d.ts +2 -9
- package/lib/getRollupPlugins.d.ts.map +1 -1
- package/lib/getRollupPlugins.js +8 -6
- package/lib/getRollupPlugins.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/plugins/postcss/index.d.ts.map +1 -1
- package/lib/plugins/postcss/index.js +2 -1
- package/lib/plugins/postcss/index.js.map +1 -1
- package/lib/plugins/stringImport.d.ts +8 -0
- package/lib/plugins/stringImport.d.ts.map +1 -0
- package/lib/plugins/stringImport.js +18 -0
- package/lib/plugins/stringImport.js.map +1 -0
- package/lib/rollup.d.ts +5 -0
- package/lib/rollup.d.ts.map +1 -1
- package/lib/rollup.js +1 -1
- package/lib/rollup.js.map +1 -1
- package/package.json +17 -18
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getRollupOptions.d.ts","sourceRoot":"","sources":["../src/getRollupOptions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC/E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAE5E,OAAO,KAAK,EAAgB,aAAa,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAUpF;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE;IACN,OAAO,EAAE,IAAI,CAAC,aAAa,EAAE,SAAS,CAAC,CAAC;IACxC,OAAO,EAAE,aAAa,CAAC;CACxB,GAAG,IAAI,CAAC,mBAAmB,EAAE,YAAY,CAAC,GAC1C;IACD,YAAY,EAAE,aAAa,CAAC;IAC5B,aAAa,EAAE,aAAa,CAAC;IAC7B,sFAAsF;IACtF,QAAQ,EAAE,SAAS,EAAE,CAAC;CACvB,
|
|
1
|
+
{"version":3,"file":"getRollupOptions.d.ts","sourceRoot":"","sources":["../src/getRollupOptions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC/E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAE5E,OAAO,KAAK,EAAgB,aAAa,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAUpF;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE;IACN,OAAO,EAAE,IAAI,CAAC,aAAa,EAAE,SAAS,CAAC,CAAC;IACxC,OAAO,EAAE,aAAa,CAAC;CACxB,GAAG,IAAI,CAAC,mBAAmB,EAAE,YAAY,CAAC,GAC1C;IACD,YAAY,EAAE,aAAa,CAAC;IAC5B,aAAa,EAAE,aAAa,CAAC;IAC7B,sFAAsF;IACtF,QAAQ,EAAE,SAAS,EAAE,CAAC;CACvB,CAmDA"}
|
package/lib/getRollupOptions.js
CHANGED
|
@@ -11,7 +11,7 @@ const ignoredWarnings = ['Circular dependency:'];
|
|
|
11
11
|
*/
|
|
12
12
|
export function getRollupOptions(params) {
|
|
13
13
|
const { options, context, newEntries } = params;
|
|
14
|
-
const { packageName, inputPath,
|
|
14
|
+
const { packageName, inputPath, external = [], inlined = [], bundlerOptions = {}, sourcemap } = options;
|
|
15
15
|
const warnings = [];
|
|
16
16
|
return {
|
|
17
17
|
warnings,
|
|
@@ -33,17 +33,7 @@ export function getRollupOptions(params) {
|
|
|
33
33
|
// Rollup requires entry keys without a leading ./
|
|
34
34
|
input: Object.fromEntries(Object.entries(newEntries).map(([key, value]) => [key.replace(/^\.\//, ''), value])),
|
|
35
35
|
// These are not possible to override properly via JSON config
|
|
36
|
-
plugins: getRollupPlugins(
|
|
37
|
-
isProduction: minify,
|
|
38
|
-
packagePath: inputPath,
|
|
39
|
-
requiresTranspile: context.requiresTranspile,
|
|
40
|
-
dynamicImports,
|
|
41
|
-
sourcemap,
|
|
42
|
-
resolveWebExtensions: !!bundlerCapabilities?.['resolve-web-extensions'],
|
|
43
|
-
config: context.config,
|
|
44
|
-
relay: bundlerCapabilities?.relay,
|
|
45
|
-
dedupeAliases,
|
|
46
|
-
}),
|
|
36
|
+
plugins: getRollupPlugins(options, context),
|
|
47
37
|
onwarn: (warning) => {
|
|
48
38
|
if (!ignoredWarnings.some((ignored) => warning.message.includes(ignored))) {
|
|
49
39
|
warnings.push(warning);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getRollupOptions.js","sourceRoot":"","sources":["../src/getRollupOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAG3E,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,wFAAwF;AACxF,mDAAmD;AACnD,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE,WAAW,EAAE,cAAc,CAAC,CAAC,CAAC;AAEnE,yCAAyC;AACzC,MAAM,eAAe,GAAG,CAAC,sBAAsB,CAAC,CAAC;AAEjD;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAC9B,MAG2C;IAO3C,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,MAAM,CAAC;IAChD,MAAM,
|
|
1
|
+
{"version":3,"file":"getRollupOptions.js","sourceRoot":"","sources":["../src/getRollupOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAG3E,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAA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E,CAAC,OAAO,EAAE,EAAE;gBAClB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC;oBAC1E,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;gBACzB,CAAC;YACH,CAAC;SACF;QACD,aAAa,EAAE;YACb,SAAS;YACT,GAAI,cAAc,CAAC,aAA+B;YAClD,8BAA8B;YAC9B,GAAG,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS;YACjF,MAAM,EAAE,IAAI;YACZ,cAAc,EAAE,WAAW;YAC3B,cAAc,EAAE,WAAW;YAC3B,cAAc,EAAE,yBAAyB;YACzC,6EAA6E;YAC7E,wEAAwE;YACxE,mFAAmF;YACnF,sBAAsB,EAAE,CAAC,kBAAkB,EAAE,aAAa,EAAE,EAAE;YAC5D,8DAA8D;YAC9D,WAAW,GAAG,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE,kBAAkB,CAAC,CAAC;SACxG;KACF,CAAC;AACJ,CAAC","sourcesContent":["import { shouldExternalizePackage } from '@ms-cloudpack/bundler-utilities';\nimport type { BundleContext, BundleOptions } from '@ms-cloudpack/common-types';\nimport type { WriteESMStubsResult } from '@ms-cloudpack/esm-stub-utilities';\nimport path from 'path';\nimport type { InputOptions, OutputOptions, RollupLog, RollupOptions } from 'rollup';\nimport { getRollupPlugins } from './getRollupPlugins.js';\n\n// These are the polyfills that we support from the 'rollup-plugin-polyfill-node' plugin\n// that are not included in the node builtins list.\nconst polyfills = new Set(['global', '_inherits', '_buffer_list']);\n\n// Spammy, usually non-actionable warning\nconst ignoredWarnings = ['Circular dependency:'];\n\n/**\n * Converts BundlerOptions to Rollup-specific options.\n */\nexport function getRollupOptions(\n params: {\n options: Omit<BundleOptions, 'entries'>;\n context: BundleContext;\n } & Pick<WriteESMStubsResult, 'newEntries'>,\n): {\n inputOptions: RollupOptions;\n outputOptions: OutputOptions;\n /** Warnings will be pushed to this array (rollup handles warnings with a callback) */\n warnings: RollupLog[];\n} {\n const { options, context, newEntries } = params;\n const { packageName, inputPath, external = [], inlined = [], bundlerOptions = {}, sourcemap } = options;\n const warnings: RollupLog[] = [];\n\n return {\n warnings,\n inputOptions: {\n external: (id, parent) =>\n shouldExternalizePackage({\n packageName,\n inputPath,\n id,\n parent,\n inlined,\n external,\n polyfills,\n shouldInlineNodeBuiltins: true,\n targetEnvironment: options.targetEnvironment,\n mode: context.config.mode,\n }),\n ...(bundlerOptions.inputOptions as InputOptions),\n // Don't allow overriding the options below\n\n // Rollup requires entry keys without a leading ./\n input: Object.fromEntries(Object.entries(newEntries).map(([key, value]) => [key.replace(/^\\.\\//, ''), value])),\n // These are not possible to override properly via JSON config\n plugins: getRollupPlugins(options, context),\n onwarn: (warning) => {\n if (!ignoredWarnings.some((ignored) => warning.message.includes(ignored))) {\n warnings.push(warning);\n }\n },\n },\n outputOptions: {\n sourcemap,\n ...(bundlerOptions.outputOptions as OutputOptions),\n // No overriding these options\n dir: options.outputPath ? path.resolve(inputPath, options.outputPath) : inputPath,\n format: 'es',\n entryFileNames: '[name].js',\n chunkFileNames: '[name].js',\n assetFileNames: 'assets/[name]-[extname]',\n // This is a fix so that the sourcemaps never include the hash in their path,\n // as that invalidates the sourcemap on change and removes break points.\n // ../../../../relative/path/to/src/path/to/file.ts -> rollup://src/path/to/file.ts\n sourcemapPathTransform: (relativeSourcePath, sourcemapPath) =>\n // No need to normalize the path as rollup will do that for us\n 'rollup://' + path.relative(inputPath, path.resolve(path.dirname(sourcemapPath), relativeSourcePath)),\n },\n };\n}\n"]}
|
|
@@ -1,11 +1,4 @@
|
|
|
1
1
|
import type { Plugin } from 'rollup';
|
|
2
|
-
import type { BundleContext,
|
|
3
|
-
export declare function getRollupPlugins(options:
|
|
4
|
-
isProduction: boolean | undefined;
|
|
5
|
-
packagePath: string;
|
|
6
|
-
dynamicImports: string[] | undefined;
|
|
7
|
-
sourcemap: boolean | undefined;
|
|
8
|
-
resolveWebExtensions: boolean;
|
|
9
|
-
relay: BundlerCapabilitiesOptions['relay'];
|
|
10
|
-
}): Plugin[];
|
|
2
|
+
import type { BundleContext, BundleOptions } from '@ms-cloudpack/common-types';
|
|
3
|
+
export declare function getRollupPlugins(options: Omit<BundleOptions, 'entries'>, context: BundleContext): Plugin[];
|
|
11
4
|
//# sourceMappingURL=getRollupPlugins.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getRollupPlugins.d.ts","sourceRoot":"","sources":["../src/getRollupPlugins.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"getRollupPlugins.d.ts","sourceRoot":"","sources":["../src/getRollupPlugins.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAIrC,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAsC,MAAM,4BAA4B,CAAC;AAmBnH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,aAAa,EAAE,SAAS,CAAC,EAAE,OAAO,EAAE,aAAa,GAAG,MAAM,EAAE,CAsK1G"}
|
package/lib/getRollupPlugins.js
CHANGED
|
@@ -9,11 +9,11 @@ import _commonjs from '@rollup/plugin-commonjs';
|
|
|
9
9
|
import _nodePolyfills from 'rollup-plugin-polyfill-node';
|
|
10
10
|
import postcss from './plugins/postcss/index.js';
|
|
11
11
|
import { normalizeRequireStatements } from './plugins/normalizeRequireStatements.js';
|
|
12
|
-
import { importAsString } from 'rollup-plugin-string-import';
|
|
13
12
|
import { isExternalPackage, resolveModule } from '@ms-cloudpack/path-utilities';
|
|
14
13
|
import { fileURLToPath } from 'url';
|
|
15
14
|
import path from 'path';
|
|
16
15
|
import aliasPlugin from '@rollup/plugin-alias';
|
|
16
|
+
import stringImport from './plugins/stringImport.js';
|
|
17
17
|
// Workaround for https://github.com/microsoft/TypeScript/issues/49189#issuecomment-1137756847
|
|
18
18
|
// (https://arethetypeswrong.github.io/?p=%40rollup%2Fplugin-replace%405.0.2)
|
|
19
19
|
// At runtime, we should always be using the ESM version of these packages, which use `export default`.
|
|
@@ -25,14 +25,16 @@ const nodePolyfills = _nodePolyfills;
|
|
|
25
25
|
const dynamicImportVariables = _dynamicImportVariables;
|
|
26
26
|
const swc = _swc;
|
|
27
27
|
const alias = aliasPlugin;
|
|
28
|
-
export function getRollupPlugins(options) {
|
|
29
|
-
const { isProduction, packagePath,
|
|
28
|
+
export function getRollupPlugins(options, context) {
|
|
29
|
+
const { minify: isProduction, inputPath: packagePath, dynamicImports = [], sourcemap, dedupeAliases, bundlerCapabilities = {}, } = options;
|
|
30
|
+
const { relay, 'resolve-web-extensions': resolveWebExtensions } = bundlerCapabilities;
|
|
31
|
+
const { resolve } = context.config;
|
|
30
32
|
const isExternal = isExternalPackage(packagePath);
|
|
31
33
|
// Only get the SWC config and transform code from internal packages, or if there are explicit
|
|
32
34
|
// typescript or jsx entries
|
|
33
|
-
const swcConfigs = !isExternal || requiresTranspile || relay ? getSwcConfig({ packagePath, sourcemap }) : undefined;
|
|
35
|
+
const swcConfigs = !isExternal || context.requiresTranspile || relay ? getSwcConfig({ packagePath, sourcemap }) : undefined;
|
|
34
36
|
// Add relay plugin to SWC configs if enabled
|
|
35
|
-
if (swcConfigs &&
|
|
37
|
+
if (swcConfigs && relay) {
|
|
36
38
|
// Ensure options is always an object before spreading
|
|
37
39
|
const safeOptions = relay && typeof relay === 'object' ? relay : {};
|
|
38
40
|
if (!safeOptions.rootDir) {
|
|
@@ -150,7 +152,7 @@ export function getRollupPlugins(options) {
|
|
|
150
152
|
}),
|
|
151
153
|
// Minify production builds as a last step.
|
|
152
154
|
!!isProduction && terser(),
|
|
153
|
-
|
|
155
|
+
stringImport({
|
|
154
156
|
include: '**/*.glsl',
|
|
155
157
|
}),
|
|
156
158
|
].filter((plugin) => !!plugin);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getRollupPlugins.js","sourceRoot":"","sources":["../src/getRollupPlugins.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,uBAAuB,MAAM,oCAAoC,CAAC;AACzE,OAAO,IAAI,MAAM,yBAAyB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAC5C,OAAO,SAAS,MAAM,yBAAyB,CAAC;AAEhD,OAAO,cAAc,MAAM,6BAA6B,CAAC;AACzD,OAAO,OAAO,MAAM,4BAA4B,CAAC;AACjD,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AACrF,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE7D,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAChF,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,WAAW,MAAM,sBAAsB,CAAC;AAE/C,8FAA8F;AAC9F,6EAA6E;AAC7E,uGAAuG;AACvG,kHAAkH;AAClH,MAAM,OAAO,GAAG,QAA8C,CAAC;AAC/D,MAAM,MAAM,GAAG,OAA4C,CAAC;AAC5D,MAAM,QAAQ,GAAG,SAAgD,CAAC;AAClE,MAAM,aAAa,GAAG,cAA0D,CAAC;AACjF,MAAM,sBAAsB,GAAG,uB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plugin-dynamic-import-vars';\nimport json from './plugins/json/index.js';\nimport { nodeResolve } from '@rollup/plugin-node-resolve';\nimport _replace from '@rollup/plugin-replace';\nimport _swc from '@rollup/plugin-swc';\nimport _terser from '@rollup/plugin-terser';\nimport _commonjs from '@rollup/plugin-commonjs';\nimport type { Plugin } from 'rollup';\nimport _nodePolyfills from 'rollup-plugin-polyfill-node';\nimport postcss from './plugins/postcss/index.js';\nimport { normalizeRequireStatements } from './plugins/normalizeRequireStatements.js';\nimport { importAsString } from 'rollup-plugin-string-import';\nimport type { BundleContext, BundlerCapabilitiesOptions, BundleOptions } from '@ms-cloudpack/common-types';\nimport { isExternalPackage, resolveModule } from '@ms-cloudpack/path-utilities';\nimport { fileURLToPath } from 'url';\nimport path from 'path';\nimport aliasPlugin from '@rollup/plugin-alias';\n\n// Workaround for https://github.com/microsoft/TypeScript/issues/49189#issuecomment-1137756847\n// (https://arethetypeswrong.github.io/?p=%40rollup%2Fplugin-replace%405.0.2)\n// At runtime, we should always be using the ESM version of these packages, which use `export default`.\n// However, typescript interprets the types as CJS modules with a `default` property (which will fail at runtime).\nconst replace = _replace as unknown as typeof _replace.default;\nconst terser = _terser as unknown as typeof _terser.default;\nconst commonjs = _commonjs as unknown as typeof _commonjs.default;\nconst nodePolyfills = _nodePolyfills as unknown as typeof _nodePolyfills.default;\nconst dynamicImportVariables = _dynamicImportVariables as unknown as typeof _dynamicImportVariables.default;\nconst swc = _swc as unknown as typeof _swc.default;\nconst alias = aliasPlugin as unknown as typeof aliasPlugin.default;\n\nexport function getRollupPlugins(\n options: Pick<BundleContext, 'requiresTranspile' | 'config'> &\n Pick<BundleOptions, 'dedupeAliases'> & {\n isProduction: boolean | undefined;\n packagePath: string;\n dynamicImports: string[] | undefined;\n sourcemap: boolean | undefined;\n resolveWebExtensions: boolean;\n relay: BundlerCapabilitiesOptions['relay'];\n },\n): Plugin[] {\n const {\n isProduction,\n packagePath,\n requiresTranspile,\n dynamicImports = [],\n sourcemap,\n resolveWebExtensions,\n config: { resolve },\n relay,\n dedupeAliases,\n } = options;\n\n const isExternal = isExternalPackage(packagePath);\n\n // Only get the SWC config and transform code from internal packages, or if there are explicit\n // typescript or jsx entries\n const swcConfigs = !isExternal || requiresTranspile || relay ? getSwcConfig({ packagePath, sourcemap }) : undefined;\n\n // Add relay plugin to SWC configs if enabled\n if (swcConfigs && !!relay) {\n // Ensure options is always an object before spreading\n const safeOptions: Partial<typeof relay> = relay && typeof relay === 'object' ? relay : {};\n\n if (!safeOptions.rootDir) {\n throw new Error('The relay capability requires a rootDir option to be set.');\n }\n\n // Base plugin options. \"eagerEsModules\" needs to be set or bundlers may default to \"require\" instead of inlining\n const relayPluginOptions = { eagerEsModules: true, ...safeOptions, language: 'typescript' };\n\n console.debug('Relay plugin options:', JSON.stringify(relayPluginOptions, null, 2));\n\n const relayPlugin = fileURLToPath(\n resolveModule({ importSpecifier: '@swc/plugin-relay', parentUrl: import.meta.url }),\n );\n\n // Add relay plugin to tsx config\n swcConfigs.tsx.jsc ??= {};\n swcConfigs.tsx.jsc.experimental ??= {};\n swcConfigs.tsx.jsc.experimental.plugins ??= [];\n swcConfigs.tsx.jsc.experimental.plugins.push([relayPlugin, relayPluginOptions]);\n\n // Add relay plugin to jsx config with JavaScript language\n swcConfigs.jsx.jsc ??= {};\n swcConfigs.jsx.jsc.experimental ??= {};\n swcConfigs.jsx.jsc.experimental.plugins ??= [];\n swcConfigs.jsx.jsc.experimental.plugins.push([relayPlugin, { ...relayPluginOptions, language: 'javascript' }]);\n }\n\n return [\n // Dedupe alias plugin to redirect imports to app's version\n dedupeAliases &&\n alias({\n entries: Object.entries(dedupeAliases).map(([find, replacement]) => ({\n find,\n replacement,\n })),\n }),\n\n // Used to replaces constants in the code.\n replace({\n values: {\n 'process.env.NODE_ENV': isProduction ? `\"production\"` : `\"development\"`,\n DEPRECATED_UNIT_TEST: 'true',\n },\n preventAssignment: true,\n }),\n\n normalizeRequireStatements(),\n\n postcss({\n // Use named exports in addition to the default export.\n namedExports: true,\n // Respect the `modules` option regardless of the file extension.\n // Otherwise only *.module.* will be passed through postcss-modules and exports won't work correctly.\n autoModules: false,\n // Options for `postcss-modules` plugin. Note that as of writing, rollup-plugin-postcss\n // uses version 4: https://github.com/madyankin/postcss-modules/tree/v4.3.1\n modules: {\n // Treat .css and .s[ac]ss files as global stylesheets unless they have the `.module` suffix\n globalModulePaths: [/(?<!\\.module)\\.(css|s[ac]ss)$/],\n // Export global classnames in addition to local ones\n exportGlobals: true,\n // Convert non-identifier-friendly class names to exported camelCase identifiers (like css-loader),\n // but keep the original names to use in the default export object too\n localsConvention: 'camelCase',\n },\n // don't load postcss config\n config: false,\n minimize: isProduction,\n sourceMap: sourcemap,\n // spammy, non-actionable warning (types have incorrect extra required props)\n use: { sass: { silenceDeprecations: ['legacy-js-api'] } },\n }),\n\n // Used to parse commonjs.\n commonjs({\n // Treat all dependencies as external esm modules (since we'll be bundling them.)\n esmExternals: true,\n\n // When __esModule is true, the default export is `exports.default`; otherwise it's `module.exports`.\n defaultIsModuleExports: true,\n\n // Convert `require('library')` to `import * as library from 'library'` always, because `import library from\n // 'library' risks runtime failure if the dependency is ESM that doesn't export a default.\n requireReturnsDefault: false,\n }),\n\n // Used to compile json files into javascript exports.\n json({\n extensions: ['.json', '.resjson'],\n }),\n\n // // Used to resolve node_modules.\n nodeResolve({\n preferBuiltins: false,\n browser: true,\n // TODO: Align with other bundlers https://github.com/microsoft/cloudpack/issues/2687\n extensions: [\n ...(resolveWebExtensions ? ['.web.js'] : []),\n '.js',\n '.json',\n ...(!isExternal && resolveWebExtensions ? ['.web.ts', '.web.tsx'] : []),\n ...(!isExternal ? ['.ts', '.tsx'] : []),\n ],\n moduleDirectories: resolve?.modules?.filter((m) => !path.isAbsolute(m)) ?? ['node_modules'],\n modulePaths: resolve?.modules?.filter((m) => path.isAbsolute(m)) ?? undefined,\n }),\n\n // Used to browserify node globals (process, global, etc.)\n nodePolyfills(),\n\n swcConfigs &&\n swc({\n include: /\\.[cm]?tsx?$/,\n swc: swcConfigs.tsx,\n }),\n\n // Support .jsx\n swcConfigs &&\n swc({\n include: /\\.[cm]?jsx$/,\n swc: swcConfigs.jsx,\n }),\n\n // Only run this plugin on **/*.dynamic.* files (plus others as specified) to avoid an extra\n // parsing/processing step on all files.\n // Must be done AFTER the TS step because it can only handle JS syntax.\n dynamicImportVariables({\n include: [\n '**/*.dynamic.*',\n // Convert the dynamic imports options to globs starting with **\n // (the plugin seems to be matching against full paths)\n ...dynamicImports.map((d) => (d.startsWith('**/') ? d : d.replace(/^(\\.?\\/)?/, '**/'))),\n ],\n }),\n\n // Minify production builds as a last step.\n !!isProduction && terser(),\n\n importAsString({\n include: '**/*.glsl',\n }),\n ].filter((plugin): plugin is Plugin => !!plugin);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"getRollupPlugins.js","sourceRoot":"","sources":["../src/getRollupPlugins.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,uBAAuB,MAAM,oCAAoC,CAAC;AACzE,OAAO,IAAI,MAAM,yBAAyB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAC5C,OAAO,SAAS,MAAM,yBAAyB,CAAC;AAEhD,OAAO,cAAc,MAAM,6BAA6B,CAAC;AACzD,OAAO,OAAO,MAAM,4BAA4B,CAAC;AACjD,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AAErF,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAChF,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,WAAW,MAAM,sBAAsB,CAAC;A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KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC,CAAC;aACxF;SACF,CAAC;QAEF,2CAA2C;QAC3C,CAAC,CAAC,YAAY,IAAI,MAAM,EAAE;QAE1B,YAAY,CAAC;YACX,OAAO,EAAE,WAAW;SACrB,CAAC;KACH,CAAC,MAAM,CAAC,CAAC,MAAM,EAAoB,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;AACnD,CAAC","sourcesContent":["import { getSwcConfig } from '@ms-cloudpack/bundler-utilities';\nimport _dynamicImportVariables from '@rollup/plugin-dynamic-import-vars';\nimport json from './plugins/json/index.js';\nimport { nodeResolve } from '@rollup/plugin-node-resolve';\nimport _replace from '@rollup/plugin-replace';\nimport _swc from '@rollup/plugin-swc';\nimport _terser from '@rollup/plugin-terser';\nimport _commonjs from '@rollup/plugin-commonjs';\nimport type { Plugin } from 'rollup';\nimport _nodePolyfills from 'rollup-plugin-polyfill-node';\nimport postcss from './plugins/postcss/index.js';\nimport { normalizeRequireStatements } from './plugins/normalizeRequireStatements.js';\nimport type { BundleContext, BundleOptions, InternalBundlerCapabilitiesOptions } from '@ms-cloudpack/common-types';\nimport { isExternalPackage, resolveModule } from '@ms-cloudpack/path-utilities';\nimport { fileURLToPath } from 'url';\nimport path from 'path';\nimport aliasPlugin from '@rollup/plugin-alias';\nimport stringImport from './plugins/stringImport.js';\n\n// Workaround for https://github.com/microsoft/TypeScript/issues/49189#issuecomment-1137756847\n// (https://arethetypeswrong.github.io/?p=%40rollup%2Fplugin-replace%405.0.2)\n// At runtime, we should always be using the ESM version of these packages, which use `export default`.\n// However, typescript interprets the types as CJS modules with a `default` property (which will fail at runtime).\nconst replace = _replace as unknown as typeof _replace.default;\nconst terser = _terser as unknown as typeof _terser.default;\nconst commonjs = _commonjs as unknown as typeof _commonjs.default;\nconst nodePolyfills = _nodePolyfills as unknown as typeof _nodePolyfills.default;\nconst dynamicImportVariables = _dynamicImportVariables as unknown as typeof _dynamicImportVariables.default;\nconst swc = _swc as unknown as typeof _swc.default;\nconst alias = aliasPlugin as unknown as typeof aliasPlugin.default;\n\nexport function getRollupPlugins(options: Omit<BundleOptions, 'entries'>, context: BundleContext): Plugin[] {\n const {\n minify: isProduction,\n inputPath: packagePath,\n dynamicImports = [],\n sourcemap,\n dedupeAliases,\n bundlerCapabilities = {},\n } = options;\n const { relay, 'resolve-web-extensions': resolveWebExtensions } =\n bundlerCapabilities as InternalBundlerCapabilitiesOptions;\n const { resolve } = context.config;\n\n const isExternal = isExternalPackage(packagePath);\n\n // Only get the SWC config and transform code from internal packages, or if there are explicit\n // typescript or jsx entries\n const swcConfigs =\n !isExternal || context.requiresTranspile || relay ? getSwcConfig({ packagePath, sourcemap }) : undefined;\n\n // Add relay plugin to SWC configs if enabled\n if (swcConfigs && relay) {\n // Ensure options is always an object before spreading\n const safeOptions: Partial<typeof relay> = relay && typeof relay === 'object' ? relay : {};\n\n if (!safeOptions.rootDir) {\n throw new Error('The relay capability requires a rootDir option to be set.');\n }\n\n // Base plugin options. \"eagerEsModules\" needs to be set or bundlers may default to \"require\" instead of inlining\n const relayPluginOptions = { eagerEsModules: true, ...safeOptions, language: 'typescript' };\n\n console.debug('Relay plugin options:', JSON.stringify(relayPluginOptions, null, 2));\n\n const relayPlugin = fileURLToPath(\n resolveModule({ importSpecifier: '@swc/plugin-relay', parentUrl: import.meta.url }),\n );\n\n // Add relay plugin to tsx config\n swcConfigs.tsx.jsc ??= {};\n swcConfigs.tsx.jsc.experimental ??= {};\n swcConfigs.tsx.jsc.experimental.plugins ??= [];\n swcConfigs.tsx.jsc.experimental.plugins.push([relayPlugin, relayPluginOptions]);\n\n // Add relay plugin to jsx config with JavaScript language\n swcConfigs.jsx.jsc ??= {};\n swcConfigs.jsx.jsc.experimental ??= {};\n swcConfigs.jsx.jsc.experimental.plugins ??= [];\n swcConfigs.jsx.jsc.experimental.plugins.push([relayPlugin, { ...relayPluginOptions, language: 'javascript' }]);\n }\n\n return [\n // Dedupe alias plugin to redirect imports to app's version\n dedupeAliases &&\n alias({\n entries: Object.entries(dedupeAliases).map(([find, replacement]) => ({\n find,\n replacement,\n })),\n }),\n\n // Used to replaces constants in the code.\n replace({\n values: {\n 'process.env.NODE_ENV': isProduction ? `\"production\"` : `\"development\"`,\n DEPRECATED_UNIT_TEST: 'true',\n },\n preventAssignment: true,\n }),\n\n normalizeRequireStatements(),\n\n postcss({\n // Use named exports in addition to the default export.\n namedExports: true,\n // Respect the `modules` option regardless of the file extension.\n // Otherwise only *.module.* will be passed through postcss-modules and exports won't work correctly.\n autoModules: false,\n // Options for `postcss-modules` plugin. Note that as of writing, rollup-plugin-postcss\n // uses version 4: https://github.com/madyankin/postcss-modules/tree/v4.3.1\n modules: {\n // Treat .css and .s[ac]ss files as global stylesheets unless they have the `.module` suffix\n globalModulePaths: [/(?<!\\.module)\\.(css|s[ac]ss)$/],\n // Export global classnames in addition to local ones\n exportGlobals: true,\n // Convert non-identifier-friendly class names to exported camelCase identifiers (like css-loader),\n // but keep the original names to use in the default export object too\n localsConvention: 'camelCase',\n },\n // don't load postcss config\n config: false,\n minimize: isProduction,\n sourceMap: sourcemap,\n // spammy, non-actionable warning (types have incorrect extra required props)\n use: { sass: { silenceDeprecations: ['legacy-js-api'] } },\n }),\n\n // Used to parse commonjs.\n commonjs({\n // Treat all dependencies as external esm modules (since we'll be bundling them.)\n esmExternals: true,\n\n // When __esModule is true, the default export is `exports.default`; otherwise it's `module.exports`.\n defaultIsModuleExports: true,\n\n // Convert `require('library')` to `import * as library from 'library'` always, because `import library from\n // 'library' risks runtime failure if the dependency is ESM that doesn't export a default.\n requireReturnsDefault: false,\n }),\n\n // Used to compile json files into javascript exports.\n json({\n extensions: ['.json', '.resjson'],\n }),\n\n // // Used to resolve node_modules.\n nodeResolve({\n preferBuiltins: false,\n browser: true,\n // TODO: Align with other bundlers https://github.com/microsoft/cloudpack/issues/2687\n extensions: [\n ...(resolveWebExtensions ? ['.web.js'] : []),\n '.js',\n '.json',\n ...(!isExternal && resolveWebExtensions ? ['.web.ts', '.web.tsx'] : []),\n ...(!isExternal ? ['.ts', '.tsx'] : []),\n ],\n moduleDirectories: resolve?.modules?.filter((m) => !path.isAbsolute(m)) ?? ['node_modules'],\n modulePaths: resolve?.modules?.filter((m) => path.isAbsolute(m)) ?? undefined,\n }),\n\n // Used to browserify node globals (process, global, etc.)\n nodePolyfills(),\n\n swcConfigs &&\n swc({\n include: /\\.[cm]?tsx?$/,\n swc: swcConfigs.tsx,\n }),\n\n // Support .jsx\n swcConfigs &&\n swc({\n include: /\\.[cm]?jsx$/,\n swc: swcConfigs.jsx,\n }),\n\n // Only run this plugin on **/*.dynamic.* files (plus others as specified) to avoid an extra\n // parsing/processing step on all files.\n // Must be done AFTER the TS step because it can only handle JS syntax.\n dynamicImportVariables({\n include: [\n '**/*.dynamic.*',\n // Convert the dynamic imports options to globs starting with **\n // (the plugin seems to be matching against full paths)\n ...dynamicImports.map((d) => (d.startsWith('**/') ? d : d.replace(/^(\\.?\\/)?/, '**/'))),\n ],\n }),\n\n // Minify production builds as a last step.\n !!isProduction && terser(),\n\n stringImport({\n include: '**/*.glsl',\n }),\n ].filter((plugin): plugin is Plugin => !!plugin);\n}\n"]}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { rollup as default } from './rollup.js';
|
|
1
|
+
export { rollup as default, type RollupCapabilityConfig } from './rollup.js';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,OAAO,EAAE,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,aAAa,CAAC"}
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,OAAO,EAA+B,MAAM,aAAa,CAAC","sourcesContent":["export { rollup as default, type RollupCapabilityConfig } from './rollup.js';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/postcss/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/postcss/index.js"],"names":[],"mappings":";AAgoBA;;;;;;;;EAkNC"}
|
|
@@ -293,7 +293,8 @@ var sassLoader = {
|
|
|
293
293
|
return new Promise((resolve, reject) => {
|
|
294
294
|
(async () => {
|
|
295
295
|
const sassModule = await loadSassOrThrow();
|
|
296
|
-
|
|
296
|
+
// accessing sassModule.default logs an error in latest versions
|
|
297
|
+
const sass = sassModule.render ? sassModule : sassModule.default;
|
|
297
298
|
const render = pify(sass.render.bind(sass));
|
|
298
299
|
const data = this.options.data || '';
|
|
299
300
|
workQueue.add(() => render({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/plugins/postcss/index.js"],"names":[],"mappings":"AAAA,mGAAmG;AACnG,qEAAqE;AACrE,oBAAoB;AACpB,oBAAoB;AACpB,cAAc;AAEd,+BAA+B;AAC/B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,MAAM,MAAM,wBAAwB,CAAC;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GAAG,CAAC,QAAQ,EAAE,CAAC;oBAC5D,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;gBAC9B,CAAC;YACH,CAAC;YAED,IAAI,CAAC,QAAQ,CAAC;gBACZ,QAAQ,EAAE,YAAY;gBACtB,IAAI,EAAE,OAAO;gBACb,MAAM,EAAE,IAAI;aACb,CAAC,CAAC;YACH,IAAI,GAAG,EAAE,CAAC;gBACR,IAAI,CAAC,QAAQ,CAAC;oBACZ,QAAQ,EAAE,WAAW;oBACrB,IAAI,EAAE,OAAO;oBACb,MAAM,EAAE,GAAG;iBACZ,CAAC,CAAC;YACL,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,EAAE,KAAK,IAAI,OAAO,EAAE,CAAC","sourcesContent":["// Fork of rollup-plugin-postcss to fix https://github.com/egoist/rollup-plugin-postcss/issues/184.\n// The plugin seems to no longer be maintained and no fork was found.\n/* tslint:disable */\n/* eslint-disable */\n// @ts-nocheck\n\n// rollup-plugin-postcss v3.0.0\nimport path from 'path';\nimport { createFilter } from '@rollup/pluginutils';\nimport Concat from 'concat-with-sourcemaps';\nimport { createRequire } from 'module';\nimport postcss from 'postcss';\nimport pify from 'pify';\nimport resolvePackage from 'resolve';\nimport PQueue from 'p-queue';\n\n// from https://github.com/eemeli/safe-identifier\n// from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#keywords\nconst reserved = new Set([\n 'break',\n 'case',\n 'catch',\n 'class',\n 'const',\n 'continue',\n 'debugger',\n 'default',\n 'delete',\n 'do',\n 'else',\n 'export',\n 'extends',\n 'false',\n 'finally',\n 'for',\n 'function',\n 'if',\n 'import',\n 'in',\n 'instanceof',\n 'new',\n 'null',\n 'return',\n 'super',\n 'switch',\n 'this',\n 'throw',\n 'true',\n 'try',\n 'typeof',\n 'var',\n 'void',\n 'while',\n 'with',\n 'let',\n 'static',\n 'yield',\n 'await',\n]);\n\n// from https://werxltd.com/wp/2010/05/13/javascript-implementation-of-javas-string-hashcode-method/\nfunction hashCode(str) {\n let hash = 0;\n for (let i = 0; i < str.length; ++i) {\n const char = str.charCodeAt(i);\n hash = (hash << 5) - hash + char;\n hash |= 0; // Convert to 32bit integer\n }\n return hash;\n}\n\nfunction identifier(key, unique) {\n if (unique) key += ` ${hashCode(key).toString(36)}`;\n const id = key.trim().replace(/\\W+/g, '_');\n return reserved.has(id) || /^\\d/.test(id) ? `_${id}` : id;\n}\n\n/**\n * Normalize path separators to forward slashes\n * @param {string} p - Path to normalize\n * @returns {string} Normalized path\n */\nfunction normalizePath(p) {\n return p?.replace(/\\\\+/g, '/') || '';\n}\n\n/**\n * Convert absolute path to relative path from current working directory\n * @param {string} filepath - Absolute file path\n * @returns {string} Relative path\n */\nfunction humanlizePath(filepath) {\n return normalizePath(path.relative(process.cwd(), filepath));\n}\n\nconst require = createRequire(import.meta.url);\n\nconst styleInjectPath = require.resolve('style-inject/dist/style-inject.es').replace(/[\\\\/]+/g, '/');\n\n/**\n * Escape CSS class name dashes for JavaScript identifiers\n */\nfunction escapeClassNameDashes(string) {\n return string.replace(/-+/g, (match) => {\n return `$${match.replace(/-/g, '_')}$`;\n });\n}\n\n/**\n * Ensure class name is a valid JavaScript identifier\n */\nfunction ensureClassName(name) {\n const escapedName = escapeClassNameDashes(name);\n return identifier(escapedName, false);\n}\n\n/**\n * Ensure PostCSS option is properly loaded\n */\nasync function ensurePostCSSOption(option) {\n if (typeof option === 'string') {\n try {\n const { createRequire } = await import('module');\n const require = createRequire(import.meta.url);\n const resolvedPath = require.resolve(option);\n return await import(resolvedPath);\n } catch {\n return option;\n }\n }\n return option;\n}\n\n/**\n * Check if file is a CSS module\n */\nfunction isModuleFile(file) {\n return /\\.module\\.[a-z]{2,6}$/.test(file);\n}\n\nvar postcssLoader = {\n name: 'postcss',\n alwaysProcess: true,\n\n async process({ code, map }) {\n // This is modified to not load postcss config.\n if (this.options.config !== false) {\n throw new Error(\n 'This is a fork of rollup-plugin-postcss that does not support loading postcss config. ' +\n 'Please set `config: false` in the plugin options.',\n );\n }\n\n const { options } = this;\n const plugins = [...(options.postcss.plugins || [])];\n\n const shouldExtract = options.extract;\n const shouldInject = options.inject;\n const modulesExported = {};\n const autoModules = options.autoModules !== false && options.onlyModules !== true;\n const isAutoModule = autoModules && isModuleFile(this.id);\n const supportModules = autoModules ? isAutoModule : options.modules;\n\n if (supportModules) {\n const postcssModules = await import('postcss-modules');\n plugins.unshift(\n postcssModules.default({\n generateScopedName: process.env.ROLLUP_POSTCSS_TEST ? '[name]_[local]' : '[name]_[local]__[hash:base64:5]',\n ...options.modules,\n getJSON(filepath, json, outpath) {\n modulesExported[filepath] = json;\n if (typeof options.modules === 'object' && typeof options.modules.getJSON === 'function') {\n return options.modules.getJSON(filepath, json, outpath);\n }\n },\n }),\n );\n }\n\n if (!shouldExtract && options.minimize) {\n const cssnano = await import('cssnano');\n plugins.push(cssnano.default(options.minimize));\n }\n\n const postcssOptions = {\n ...this.options.postcss,\n to: options.to || this.id,\n from: this.id,\n map: this.sourceMap\n ? shouldExtract\n ? { inline: false, annotation: false }\n : { inline: true, annotation: false }\n : false,\n };\n\n delete postcssOptions.plugins;\n\n postcssOptions.parser = await ensurePostCSSOption(postcssOptions.parser);\n postcssOptions.syntax = await ensurePostCSSOption(postcssOptions.syntax);\n postcssOptions.stringifier = await ensurePostCSSOption(postcssOptions.stringifier);\n\n if (map && postcssOptions.map) {\n postcssOptions.map.prev = typeof map === 'string' ? JSON.parse(map) : map;\n }\n\n if (plugins.length === 0) {\n const noopPlugin = () => ({\n postcssPlugin: 'postcss-noop-plugin',\n Once() {},\n });\n plugins.push(noopPlugin());\n }\n\n const result = await postcss(plugins).process(code, postcssOptions);\n\n for (const message of result.messages) {\n if (message.type === 'dependency') {\n this.dependencies.add(message.file);\n }\n }\n\n for (const warning of result.warnings()) {\n if (!warning.message) {\n warning.message = warning.text;\n }\n this.warn(warning);\n }\n\n const outputMap = result.map && JSON.parse(result.map.toString());\n if (outputMap?.sources) {\n outputMap.sources = outputMap.sources.map((v) => normalizePath(v));\n }\n\n let output = '';\n let extracted;\n\n if (options.namedExports) {\n const json = modulesExported[this.id];\n const getClassName = typeof options.namedExports === 'function' ? options.namedExports : ensureClassName;\n\n for (const name in json) {\n const newName = getClassName(name);\n // Log transformed class names\n // But skip this when namedExports is a function\n // Since a user like you can manually log that if you want\n if (name !== newName && typeof options.namedExports !== 'function') {\n this.warn(`Exported \"${name}\" as \"${newName}\" in ${humanlizePath(this.id)}`);\n }\n\n if (!json[newName]) {\n json[newName] = json[name];\n }\n\n output += `export var ${newName} = ${JSON.stringify(json[name])};\\n`;\n }\n }\n\n const cssVariableName = identifier('css', true);\n\n if (shouldExtract) {\n output += `export default ${JSON.stringify(modulesExported[this.id])};`;\n extracted = {\n id: this.id,\n code: result.css,\n map: outputMap,\n };\n } else {\n const module = supportModules ? JSON.stringify(modulesExported[this.id]) : cssVariableName;\n\n output += `var ${cssVariableName} = ${JSON.stringify(result.css)};\\n`;\n output += `export default ${module};\\n`;\n output += `export var stylesheet=${JSON.stringify(result.css)};`;\n }\n\n if (!shouldExtract && shouldInject) {\n output +=\n typeof options.inject === 'function'\n ? options.inject(cssVariableName, this.id)\n : `\\nimport styleInject from '${styleInjectPath}';\\n` +\n `styleInject(${cssVariableName}${\n Object.keys(options.inject).length > 0 ? `,${JSON.stringify(options.inject)}` : ''\n });`;\n }\n\n return {\n code: output,\n map: outputMap,\n extracted,\n };\n },\n};\n\n/**\n * Load a module using modern ESM dynamic imports\n * @param {string} moduleId - The module to load\n * @returns {Promise<any>} The loaded module\n */\nasync function loadModule(moduleId) {\n try {\n // Try to import the module directly\n return await import(moduleId);\n } catch {\n // If direct import fails, try resolving from current working directory\n try {\n const { createRequire } = await import('module');\n const require = createRequire(import.meta.url);\n const resolvedPath = require.resolve(moduleId);\n return await import(resolvedPath);\n } catch {\n // Return null if module cannot be loaded\n return null;\n }\n }\n}\n\n// This queue makes sure node-sass leaves one thread available for executing fs tasks\n// See: https://github.com/sass/node-sass/issues/857\nconst threadPoolSize = process.env.UV_THREADPOOL_SIZE || 4;\nconst workQueue = new PQueue({ concurrency: threadPoolSize - 1 });\n\nconst moduleRe = /^~([a-z\\d]|@).+/i;\n\nconst getUrlOfPartial = (url) => {\n const parsedUrl = path.parse(url);\n return `${parsedUrl.dir}${path.sep}_${parsedUrl.base}`;\n};\n\nconst resolvePromise = pify(resolvePackage);\n\n// List of supported SASS modules in the order of preference\nconst sassModuleIds = ['sass', 'node-sass'];\n\n/* eslint import/no-anonymous-default-export: [2, {\"allowObject\": true}] */\nvar sassLoader = {\n name: 'sass',\n test: /\\.(sass|scss)$/,\n process({ code }) {\n return new Promise((resolve, reject) => {\n (async () => {\n const sassModule = await loadSassOrThrow();\n const sass = sassModule.default || sassModule;\n const render = pify(sass.render.bind(sass));\n const data = this.options.data || '';\n workQueue.add(() =>\n render({\n ...this.options,\n file: this.id,\n data: data + code,\n indentedSyntax: /\\.sass$/.test(this.id),\n sourceMap: this.sourceMap,\n importer: [\n (url, importer, done) => {\n if (!moduleRe.test(url)) return done({ file: url });\n\n const moduleUrl = url.slice(1);\n const partialUrl = getUrlOfPartial(moduleUrl);\n\n const options = {\n basedir: path.dirname(importer),\n extensions: ['.scss', '.sass', '.css'],\n };\n const finishImport = (id) => {\n done({\n // Do not add `.css` extension in order to inline the file\n file: id.endsWith('.css') ? id.replace(/\\.css$/, '') : id,\n });\n };\n\n const next = () => {\n // Catch all resolving errors, return the original file and pass responsibility back to other custom importers\n done({ file: url });\n };\n\n // Give precedence to importing a partial\n resolvePromise(partialUrl, options)\n .then(finishImport)\n .catch((error) => {\n if (error.code === 'MODULE_NOT_FOUND' || error.code === 'ENOENT') {\n resolvePromise(moduleUrl, options).then(finishImport).catch(next);\n } else {\n next();\n }\n });\n },\n ].concat(this.options.importer || []),\n })\n .then((result) => {\n for (const file of result.stats.includedFiles) {\n this.dependencies.add(file);\n }\n\n resolve({\n code: result.css.toString(),\n map: result.map && result.map.toString(),\n });\n })\n .catch(reject),\n );\n })();\n });\n },\n};\n\nasync function loadSassOrThrow() {\n // Loading one of the supported modules\n for (const moduleId of sassModuleIds) {\n const module = await loadModule(moduleId);\n if (module) {\n return module;\n }\n }\n\n // Throwing exception if module can't be loaded\n throw new Error(\n `You need to install one of the following packages: ${sassModuleIds\n .map((moduleId) => `\"${moduleId}\"`)\n .join(', ')} in order to process SASS files`,\n );\n}\n\nvar stylusLoader = {\n name: 'stylus',\n test: /\\.(styl|stylus)$/,\n\n async process({ code }) {\n const stylusModule = await loadModule('stylus');\n if (!stylusModule) {\n throw new Error('You need to install \"stylus\" package to process Stylus files');\n }\n\n const stylus = stylusModule.default || stylusModule;\n const style = stylus(code, {\n ...this.options,\n filename: this.id,\n sourcemap: this.sourceMap && {},\n });\n\n const renderAsync = pify(style.render.bind(style));\n\n try {\n const css = await renderAsync();\n const deps = style.deps();\n\n for (const dep of deps) {\n this.dependencies.add(dep);\n }\n\n return {\n code: css,\n map: style.sourcemap,\n };\n } catch (error) {\n throw new Error(`Stylus compilation failed: ${error.message}`);\n }\n },\n};\n\nvar lessLoader = {\n name: 'less',\n test: /\\.less$/,\n\n async process({ code }) {\n const lessModule = await loadModule('less');\n if (!lessModule) {\n throw new Error('You need to install \"less\" package to process Less files');\n }\n\n const less = lessModule.default || lessModule;\n const renderAsync = pify(less.render.bind(less));\n\n try {\n const {\n css,\n map: initialMap,\n imports,\n } = await renderAsync(code, {\n ...this.options,\n sourceMap: this.sourceMap && {},\n filename: this.id,\n });\n\n for (const dep of imports) {\n this.dependencies.add(dep);\n }\n\n let map = initialMap;\n if (map) {\n map = JSON.parse(map);\n map.sources = map.sources.map((source) => humanlizePath(source));\n }\n\n return {\n code: css,\n map,\n };\n } catch (error) {\n throw new Error(`Less compilation failed: ${error.message}`);\n }\n },\n};\n\nconst matchFile = (filepath, condition) => {\n if (typeof condition === 'function') {\n return condition(filepath);\n }\n\n return condition && condition.test(filepath);\n};\n\nclass Loaders {\n constructor(options = {}) {\n this.use = options.use.map((rule) => {\n if (typeof rule === 'string') {\n return [rule];\n }\n\n if (Array.isArray(rule)) {\n return rule;\n }\n\n throw new TypeError('The rule in `use` option must be string or Array!');\n });\n this.loaders = [];\n\n const extensions = options.extensions || ['.css', '.sss', '.pcss'];\n const customPostcssLoader = {\n ...postcssLoader,\n test: (filepath) => extensions.some((ext) => path.extname(filepath) === ext),\n };\n this.registerLoader(customPostcssLoader);\n this.registerLoader(sassLoader);\n this.registerLoader(stylusLoader);\n this.registerLoader(lessLoader);\n if (options.loaders) {\n options.loaders.forEach((loader) => this.registerLoader(loader));\n }\n }\n\n registerLoader(loader) {\n const existing = this.getLoader(loader.name);\n if (existing) {\n this.removeLoader(loader.name);\n }\n\n this.loaders.push(loader);\n return this;\n }\n\n removeLoader(name) {\n this.loaders = this.loaders.filter((loader) => loader.name !== name);\n return this;\n }\n\n isSupported(filepath) {\n return this.loaders.some((loader) => {\n return matchFile(filepath, loader.test);\n });\n }\n\n /**\n * Process the resource with loaders in serial\n * @param {object} resource\n * @param {string} resource.code\n * @param {any} resource.map\n * @param {object} context\n * @param {string} context.id The absolute path to resource\n * @param {boolean | 'inline'} context.sourceMap\n * @param {Set<string>} context.dependencies A set of dependencies to watch\n * @returns {{code: string, map?: any}}\n */\n async process({ code, map }, context) {\n const loaderFunctions = this.use\n .slice()\n .reverse()\n .map(([name, options]) => {\n const loader = this.getLoader(name);\n const loaderContext = {\n options: options || {},\n ...context,\n };\n\n return (v) => {\n if (loader.alwaysProcess || matchFile(loaderContext.id, loader.test)) {\n return loader.process.call(loaderContext, v);\n }\n\n // Otherwise directly return input value\n return v;\n };\n });\n\n let result = { code, map };\n for (const loaderFn of loaderFunctions) {\n result = await loaderFn(result);\n }\n\n return result;\n }\n\n getLoader(name) {\n return this.loaders.find((loader) => loader.name === name);\n }\n}\n\n/**\n * The options that could be `boolean` or `object`\n * We convert it to an object when it's truthy\n * Otherwise fallback to default value\n */\nfunction inferOption(option, defaultValue) {\n if (option === false) return false;\n if (option && typeof option === 'object') return option;\n return option ? {} : defaultValue;\n}\n\n/**\n * Recursively get the correct import order from rollup\n * We only process a file once\n *\n * @param {string} id\n * @param {Function} getModuleInfo\n * @param {Set<string>} seen\n */\nfunction getRecursiveImportOrder(id, getModuleInfo, seen = new Set()) {\n if (seen.has(id)) {\n return [];\n }\n\n seen.add(id);\n\n const result = [id];\n getModuleInfo(id).importedIds.forEach((importFile) => {\n result.push(...getRecursiveImportOrder(importFile, getModuleInfo, seen));\n });\n\n return result;\n}\n\n/* eslint import/no-anonymous-default-export: [2, {\"allowArrowFunction\": true}] */\nvar index = (options = {}) => {\n const filter = createFilter(options.include, options.exclude);\n const postcssPlugins = Array.isArray(options.plugins) ? options.plugins.filter(Boolean) : options.plugins;\n const { sourceMap } = options;\n const postcssLoaderOptions = {\n /** Inject CSS as `<style>` to `<head>` */\n inject: typeof options.inject === 'function' ? options.inject : inferOption(options.inject, {}),\n /** Extract CSS */\n extract: typeof options.extract === 'undefined' ? false : options.extract,\n /** CSS modules */\n onlyModules: options.modules === true,\n modules: inferOption(options.modules, false),\n namedExports: options.namedExports,\n /** Automatically CSS modules for .module.xxx files */\n autoModules: options.autoModules,\n /** Options for cssnano */\n minimize: inferOption(options.minimize, false),\n /** Postcss config file */\n config: inferOption(options.config, false),\n /** PostCSS target filename hint, for plugins that are relying on it */\n to: options.to,\n /** PostCSS options */\n postcss: {\n parser: options.parser,\n plugins: postcssPlugins,\n syntax: options.syntax,\n stringifier: options.stringifier,\n exec: options.exec,\n },\n };\n let use = ['sass', 'stylus', 'less'];\n if (Array.isArray(options.use)) {\n ({ use } = options);\n } else if (options.use !== null && typeof options.use === 'object') {\n use = [\n ['sass', options.use.sass || {}],\n ['stylus', options.use.stylus || {}],\n ['less', options.use.less || {}],\n ];\n }\n\n use.unshift(['postcss', postcssLoaderOptions]);\n\n const loaders = new Loaders({\n use,\n loaders: options.loaders,\n extensions: options.extensions,\n });\n\n const extracted = new Map();\n\n return {\n name: 'postcss',\n\n async transform(code, id) {\n if (!filter(id) || !loaders.isSupported(id)) {\n return null;\n }\n\n if (typeof options.onImport === 'function') {\n options.onImport(id);\n }\n\n const loaderContext = {\n id,\n sourceMap,\n dependencies: new Set(),\n warn: this.warn.bind(this),\n plugin: this,\n };\n\n const result = await loaders.process(\n {\n code,\n map: undefined,\n },\n loaderContext,\n );\n\n for (const dep of loaderContext.dependencies) {\n this.addWatchFile(dep);\n }\n\n if (postcssLoaderOptions.extract) {\n extracted.set(id, result.extracted);\n return {\n code: result.code,\n map: { mappings: '' },\n };\n }\n\n return {\n code: result.code,\n map: result.map || { mappings: '' },\n };\n },\n\n augmentChunkHash() {\n if (extracted.size === 0) return;\n const extractedValue = [...extracted].reduce(\n (object, [key, value]) => ({\n ...object,\n [key]: value,\n }),\n {},\n );\n return JSON.stringify(extractedValue);\n },\n\n async generateBundle(options_, bundle) {\n if (extracted.size === 0 || !(options_.dir || options_.file)) return;\n\n // TODO: support `[hash]`\n const dir = options_.dir || path.dirname(options_.file);\n const file =\n options_.file ||\n path.join(\n options_.dir,\n Object.keys(bundle).find((fileName) => bundle[fileName].isEntry),\n );\n const getExtracted = () => {\n let fileName = `${path.basename(file, path.extname(file))}.css`;\n if (typeof postcssLoaderOptions.extract === 'string') {\n fileName = path.isAbsolute(postcssLoaderOptions.extract)\n ? normalizePath(path.relative(dir, postcssLoaderOptions.extract))\n : normalizePath(postcssLoaderOptions.extract);\n }\n\n const concat = new Concat(true, fileName, '\\n');\n const entries = [...extracted.values()];\n const { modules, facadeModuleId } = bundle[normalizePath(path.relative(dir, file))];\n\n if (modules) {\n const moduleIds = getRecursiveImportOrder(facadeModuleId, this.getModuleInfo);\n entries.sort((a, b) => moduleIds.indexOf(a.id) - moduleIds.indexOf(b.id));\n }\n\n for (const result of entries) {\n const relative = normalizePath(path.relative(dir, result.id));\n const map = result.map || null;\n if (map) {\n map.file = fileName;\n }\n\n concat.add(relative, result.code, map);\n }\n\n let code = concat.content;\n\n if (sourceMap === 'inline') {\n code += `\\n/*# sourceMappingURL=data:application/json;base64,${Buffer.from(concat.sourceMap, 'utf8').toString(\n 'base64',\n )}*/`;\n } else if (sourceMap === true) {\n code += `\\n/*# sourceMappingURL=${path.basename(fileName)}.map */`;\n }\n\n return {\n code,\n map: sourceMap === true && concat.sourceMap,\n codeFileName: fileName,\n mapFileName: `${fileName}.map`,\n };\n };\n\n if (options.onExtract) {\n const shouldExtract = await options.onExtract(getExtracted);\n if (shouldExtract === false) {\n return;\n }\n }\n\n const { code: initialCode, codeFileName, map: initialMap, mapFileName } = getExtracted();\n let code = initialCode;\n let map = initialMap;\n // Perform cssnano on the extracted file\n if (postcssLoaderOptions.minimize) {\n const cssOptions = {};\n cssOptions.from = codeFileName;\n if (sourceMap === 'inline') {\n cssOptions.map = { inline: true };\n } else if (sourceMap === true && map) {\n cssOptions.map = { prev: map };\n cssOptions.to = codeFileName;\n }\n\n const cssnano = (await import('cssnano')).default;\n\n const result = await cssnano(postcssLoaderOptions.minimize).process(code, cssOptions);\n code = result.css;\n\n if (sourceMap === true && result.map && result.map.toString) {\n map = result.map.toString();\n }\n }\n\n this.emitFile({\n fileName: codeFileName,\n type: 'asset',\n source: code,\n });\n if (map) {\n this.emitFile({\n fileName: mapFileName,\n type: 'asset',\n source: map,\n });\n }\n },\n };\n};\n\nexport { index as default };\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/plugins/postcss/index.js"],"names":[],"mappings":"AAAA,mGAAmG;AACnG,qEAAqE;AACrE,oBAAoB;AACpB,oBAAoB;AACpB,cAAc;AAEd,+BAA+B;AAC/B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,MAAM,MAAM,wBAAwB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,I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,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;gBAC9B,CAAC;YACH,CAAC;YAED,IAAI,CAAC,QAAQ,CAAC;gBACZ,QAAQ,EAAE,YAAY;gBACtB,IAAI,EAAE,OAAO;gBACb,MAAM,EAAE,IAAI;aACb,CAAC,CAAC;YACH,IAAI,GAAG,EAAE,CAAC;gBACR,IAAI,CAAC,QAAQ,CAAC;oBACZ,QAAQ,EAAE,WAAW;oBACrB,IAAI,EAAE,OAAO;oBACb,MAAM,EAAE,GAAG;iBACZ,CAAC,CAAC;YACL,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,EAAE,KAAK,IAAI,OAAO,EAAE,CAAC","sourcesContent":["// Fork of rollup-plugin-postcss to fix https://github.com/egoist/rollup-plugin-postcss/issues/184.\n// The plugin seems to no longer be maintained and no fork was found.\n/* tslint:disable */\n/* eslint-disable */\n// @ts-nocheck\n\n// rollup-plugin-postcss v3.0.0\nimport path from 'path';\nimport { createFilter } from '@rollup/pluginutils';\nimport Concat from 'concat-with-sourcemaps';\nimport { createRequire } from 'module';\nimport postcss from 'postcss';\nimport pify from 'pify';\nimport resolvePackage from 'resolve';\nimport PQueue from 'p-queue';\n\n// from https://github.com/eemeli/safe-identifier\n// from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#keywords\nconst reserved = new Set([\n 'break',\n 'case',\n 'catch',\n 'class',\n 'const',\n 'continue',\n 'debugger',\n 'default',\n 'delete',\n 'do',\n 'else',\n 'export',\n 'extends',\n 'false',\n 'finally',\n 'for',\n 'function',\n 'if',\n 'import',\n 'in',\n 'instanceof',\n 'new',\n 'null',\n 'return',\n 'super',\n 'switch',\n 'this',\n 'throw',\n 'true',\n 'try',\n 'typeof',\n 'var',\n 'void',\n 'while',\n 'with',\n 'let',\n 'static',\n 'yield',\n 'await',\n]);\n\n// from https://werxltd.com/wp/2010/05/13/javascript-implementation-of-javas-string-hashcode-method/\nfunction hashCode(str) {\n let hash = 0;\n for (let i = 0; i < str.length; ++i) {\n const char = str.charCodeAt(i);\n hash = (hash << 5) - hash + char;\n hash |= 0; // Convert to 32bit integer\n }\n return hash;\n}\n\nfunction identifier(key, unique) {\n if (unique) key += ` ${hashCode(key).toString(36)}`;\n const id = key.trim().replace(/\\W+/g, '_');\n return reserved.has(id) || /^\\d/.test(id) ? `_${id}` : id;\n}\n\n/**\n * Normalize path separators to forward slashes\n * @param {string} p - Path to normalize\n * @returns {string} Normalized path\n */\nfunction normalizePath(p) {\n return p?.replace(/\\\\+/g, '/') || '';\n}\n\n/**\n * Convert absolute path to relative path from current working directory\n * @param {string} filepath - Absolute file path\n * @returns {string} Relative path\n */\nfunction humanlizePath(filepath) {\n return normalizePath(path.relative(process.cwd(), filepath));\n}\n\nconst require = createRequire(import.meta.url);\n\nconst styleInjectPath = require.resolve('style-inject/dist/style-inject.es').replace(/[\\\\/]+/g, '/');\n\n/**\n * Escape CSS class name dashes for JavaScript identifiers\n */\nfunction escapeClassNameDashes(string) {\n return string.replace(/-+/g, (match) => {\n return `$${match.replace(/-/g, '_')}$`;\n });\n}\n\n/**\n * Ensure class name is a valid JavaScript identifier\n */\nfunction ensureClassName(name) {\n const escapedName = escapeClassNameDashes(name);\n return identifier(escapedName, false);\n}\n\n/**\n * Ensure PostCSS option is properly loaded\n */\nasync function ensurePostCSSOption(option) {\n if (typeof option === 'string') {\n try {\n const { createRequire } = await import('module');\n const require = createRequire(import.meta.url);\n const resolvedPath = require.resolve(option);\n return await import(resolvedPath);\n } catch {\n return option;\n }\n }\n return option;\n}\n\n/**\n * Check if file is a CSS module\n */\nfunction isModuleFile(file) {\n return /\\.module\\.[a-z]{2,6}$/.test(file);\n}\n\nvar postcssLoader = {\n name: 'postcss',\n alwaysProcess: true,\n\n async process({ code, map }) {\n // This is modified to not load postcss config.\n if (this.options.config !== false) {\n throw new Error(\n 'This is a fork of rollup-plugin-postcss that does not support loading postcss config. ' +\n 'Please set `config: false` in the plugin options.',\n );\n }\n\n const { options } = this;\n const plugins = [...(options.postcss.plugins || [])];\n\n const shouldExtract = options.extract;\n const shouldInject = options.inject;\n const modulesExported = {};\n const autoModules = options.autoModules !== false && options.onlyModules !== true;\n const isAutoModule = autoModules && isModuleFile(this.id);\n const supportModules = autoModules ? isAutoModule : options.modules;\n\n if (supportModules) {\n const postcssModules = await import('postcss-modules');\n plugins.unshift(\n postcssModules.default({\n generateScopedName: process.env.ROLLUP_POSTCSS_TEST ? '[name]_[local]' : '[name]_[local]__[hash:base64:5]',\n ...options.modules,\n getJSON(filepath, json, outpath) {\n modulesExported[filepath] = json;\n if (typeof options.modules === 'object' && typeof options.modules.getJSON === 'function') {\n return options.modules.getJSON(filepath, json, outpath);\n }\n },\n }),\n );\n }\n\n if (!shouldExtract && options.minimize) {\n const cssnano = await import('cssnano');\n plugins.push(cssnano.default(options.minimize));\n }\n\n const postcssOptions = {\n ...this.options.postcss,\n to: options.to || this.id,\n from: this.id,\n map: this.sourceMap\n ? shouldExtract\n ? { inline: false, annotation: false }\n : { inline: true, annotation: false }\n : false,\n };\n\n delete postcssOptions.plugins;\n\n postcssOptions.parser = await ensurePostCSSOption(postcssOptions.parser);\n postcssOptions.syntax = await ensurePostCSSOption(postcssOptions.syntax);\n postcssOptions.stringifier = await ensurePostCSSOption(postcssOptions.stringifier);\n\n if (map && postcssOptions.map) {\n postcssOptions.map.prev = typeof map === 'string' ? JSON.parse(map) : map;\n }\n\n if (plugins.length === 0) {\n const noopPlugin = () => ({\n postcssPlugin: 'postcss-noop-plugin',\n Once() {},\n });\n plugins.push(noopPlugin());\n }\n\n const result = await postcss(plugins).process(code, postcssOptions);\n\n for (const message of result.messages) {\n if (message.type === 'dependency') {\n this.dependencies.add(message.file);\n }\n }\n\n for (const warning of result.warnings()) {\n if (!warning.message) {\n warning.message = warning.text;\n }\n this.warn(warning);\n }\n\n const outputMap = result.map && JSON.parse(result.map.toString());\n if (outputMap?.sources) {\n outputMap.sources = outputMap.sources.map((v) => normalizePath(v));\n }\n\n let output = '';\n let extracted;\n\n if (options.namedExports) {\n const json = modulesExported[this.id];\n const getClassName = typeof options.namedExports === 'function' ? options.namedExports : ensureClassName;\n\n for (const name in json) {\n const newName = getClassName(name);\n // Log transformed class names\n // But skip this when namedExports is a function\n // Since a user like you can manually log that if you want\n if (name !== newName && typeof options.namedExports !== 'function') {\n this.warn(`Exported \"${name}\" as \"${newName}\" in ${humanlizePath(this.id)}`);\n }\n\n if (!json[newName]) {\n json[newName] = json[name];\n }\n\n output += `export var ${newName} = ${JSON.stringify(json[name])};\\n`;\n }\n }\n\n const cssVariableName = identifier('css', true);\n\n if (shouldExtract) {\n output += `export default ${JSON.stringify(modulesExported[this.id])};`;\n extracted = {\n id: this.id,\n code: result.css,\n map: outputMap,\n };\n } else {\n const module = supportModules ? JSON.stringify(modulesExported[this.id]) : cssVariableName;\n\n output += `var ${cssVariableName} = ${JSON.stringify(result.css)};\\n`;\n output += `export default ${module};\\n`;\n output += `export var stylesheet=${JSON.stringify(result.css)};`;\n }\n\n if (!shouldExtract && shouldInject) {\n output +=\n typeof options.inject === 'function'\n ? options.inject(cssVariableName, this.id)\n : `\\nimport styleInject from '${styleInjectPath}';\\n` +\n `styleInject(${cssVariableName}${\n Object.keys(options.inject).length > 0 ? `,${JSON.stringify(options.inject)}` : ''\n });`;\n }\n\n return {\n code: output,\n map: outputMap,\n extracted,\n };\n },\n};\n\n/**\n * Load a module using modern ESM dynamic imports\n * @param {string} moduleId - The module to load\n * @returns {Promise<any>} The loaded module\n */\nasync function loadModule(moduleId) {\n try {\n // Try to import the module directly\n return await import(moduleId);\n } catch {\n // If direct import fails, try resolving from current working directory\n try {\n const { createRequire } = await import('module');\n const require = createRequire(import.meta.url);\n const resolvedPath = require.resolve(moduleId);\n return await import(resolvedPath);\n } catch {\n // Return null if module cannot be loaded\n return null;\n }\n }\n}\n\n// This queue makes sure node-sass leaves one thread available for executing fs tasks\n// See: https://github.com/sass/node-sass/issues/857\nconst threadPoolSize = process.env.UV_THREADPOOL_SIZE || 4;\nconst workQueue = new PQueue({ concurrency: threadPoolSize - 1 });\n\nconst moduleRe = /^~([a-z\\d]|@).+/i;\n\nconst getUrlOfPartial = (url) => {\n const parsedUrl = path.parse(url);\n return `${parsedUrl.dir}${path.sep}_${parsedUrl.base}`;\n};\n\nconst resolvePromise = pify(resolvePackage);\n\n// List of supported SASS modules in the order of preference\nconst sassModuleIds = ['sass', 'node-sass'];\n\n/* eslint import/no-anonymous-default-export: [2, {\"allowObject\": true}] */\nvar sassLoader = {\n name: 'sass',\n test: /\\.(sass|scss)$/,\n process({ code }) {\n return new Promise((resolve, reject) => {\n (async () => {\n const sassModule = await loadSassOrThrow();\n // accessing sassModule.default logs an error in latest versions\n const sass = sassModule.render ? sassModule : sassModule.default;\n const render = pify(sass.render.bind(sass));\n const data = this.options.data || '';\n workQueue.add(() =>\n render({\n ...this.options,\n file: this.id,\n data: data + code,\n indentedSyntax: /\\.sass$/.test(this.id),\n sourceMap: this.sourceMap,\n importer: [\n (url, importer, done) => {\n if (!moduleRe.test(url)) return done({ file: url });\n\n const moduleUrl = url.slice(1);\n const partialUrl = getUrlOfPartial(moduleUrl);\n\n const options = {\n basedir: path.dirname(importer),\n extensions: ['.scss', '.sass', '.css'],\n };\n const finishImport = (id) => {\n done({\n // Do not add `.css` extension in order to inline the file\n file: id.endsWith('.css') ? id.replace(/\\.css$/, '') : id,\n });\n };\n\n const next = () => {\n // Catch all resolving errors, return the original file and pass responsibility back to other custom importers\n done({ file: url });\n };\n\n // Give precedence to importing a partial\n resolvePromise(partialUrl, options)\n .then(finishImport)\n .catch((error) => {\n if (error.code === 'MODULE_NOT_FOUND' || error.code === 'ENOENT') {\n resolvePromise(moduleUrl, options).then(finishImport).catch(next);\n } else {\n next();\n }\n });\n },\n ].concat(this.options.importer || []),\n })\n .then((result) => {\n for (const file of result.stats.includedFiles) {\n this.dependencies.add(file);\n }\n\n resolve({\n code: result.css.toString(),\n map: result.map && result.map.toString(),\n });\n })\n .catch(reject),\n );\n })();\n });\n },\n};\n\nasync function loadSassOrThrow() {\n // Loading one of the supported modules\n for (const moduleId of sassModuleIds) {\n const module = await loadModule(moduleId);\n if (module) {\n return module;\n }\n }\n\n // Throwing exception if module can't be loaded\n throw new Error(\n `You need to install one of the following packages: ${sassModuleIds\n .map((moduleId) => `\"${moduleId}\"`)\n .join(', ')} in order to process SASS files`,\n );\n}\n\nvar stylusLoader = {\n name: 'stylus',\n test: /\\.(styl|stylus)$/,\n\n async process({ code }) {\n const stylusModule = await loadModule('stylus');\n if (!stylusModule) {\n throw new Error('You need to install \"stylus\" package to process Stylus files');\n }\n\n const stylus = stylusModule.default || stylusModule;\n const style = stylus(code, {\n ...this.options,\n filename: this.id,\n sourcemap: this.sourceMap && {},\n });\n\n const renderAsync = pify(style.render.bind(style));\n\n try {\n const css = await renderAsync();\n const deps = style.deps();\n\n for (const dep of deps) {\n this.dependencies.add(dep);\n }\n\n return {\n code: css,\n map: style.sourcemap,\n };\n } catch (error) {\n throw new Error(`Stylus compilation failed: ${error.message}`);\n }\n },\n};\n\nvar lessLoader = {\n name: 'less',\n test: /\\.less$/,\n\n async process({ code }) {\n const lessModule = await loadModule('less');\n if (!lessModule) {\n throw new Error('You need to install \"less\" package to process Less files');\n }\n\n const less = lessModule.default || lessModule;\n const renderAsync = pify(less.render.bind(less));\n\n try {\n const {\n css,\n map: initialMap,\n imports,\n } = await renderAsync(code, {\n ...this.options,\n sourceMap: this.sourceMap && {},\n filename: this.id,\n });\n\n for (const dep of imports) {\n this.dependencies.add(dep);\n }\n\n let map = initialMap;\n if (map) {\n map = JSON.parse(map);\n map.sources = map.sources.map((source) => humanlizePath(source));\n }\n\n return {\n code: css,\n map,\n };\n } catch (error) {\n throw new Error(`Less compilation failed: ${error.message}`);\n }\n },\n};\n\nconst matchFile = (filepath, condition) => {\n if (typeof condition === 'function') {\n return condition(filepath);\n }\n\n return condition && condition.test(filepath);\n};\n\nclass Loaders {\n constructor(options = {}) {\n this.use = options.use.map((rule) => {\n if (typeof rule === 'string') {\n return [rule];\n }\n\n if (Array.isArray(rule)) {\n return rule;\n }\n\n throw new TypeError('The rule in `use` option must be string or Array!');\n });\n this.loaders = [];\n\n const extensions = options.extensions || ['.css', '.sss', '.pcss'];\n const customPostcssLoader = {\n ...postcssLoader,\n test: (filepath) => extensions.some((ext) => path.extname(filepath) === ext),\n };\n this.registerLoader(customPostcssLoader);\n this.registerLoader(sassLoader);\n this.registerLoader(stylusLoader);\n this.registerLoader(lessLoader);\n if (options.loaders) {\n options.loaders.forEach((loader) => this.registerLoader(loader));\n }\n }\n\n registerLoader(loader) {\n const existing = this.getLoader(loader.name);\n if (existing) {\n this.removeLoader(loader.name);\n }\n\n this.loaders.push(loader);\n return this;\n }\n\n removeLoader(name) {\n this.loaders = this.loaders.filter((loader) => loader.name !== name);\n return this;\n }\n\n isSupported(filepath) {\n return this.loaders.some((loader) => {\n return matchFile(filepath, loader.test);\n });\n }\n\n /**\n * Process the resource with loaders in serial\n * @param {object} resource\n * @param {string} resource.code\n * @param {any} resource.map\n * @param {object} context\n * @param {string} context.id The absolute path to resource\n * @param {boolean | 'inline'} context.sourceMap\n * @param {Set<string>} context.dependencies A set of dependencies to watch\n * @returns {{code: string, map?: any}}\n */\n async process({ code, map }, context) {\n const loaderFunctions = this.use\n .slice()\n .reverse()\n .map(([name, options]) => {\n const loader = this.getLoader(name);\n const loaderContext = {\n options: options || {},\n ...context,\n };\n\n return (v) => {\n if (loader.alwaysProcess || matchFile(loaderContext.id, loader.test)) {\n return loader.process.call(loaderContext, v);\n }\n\n // Otherwise directly return input value\n return v;\n };\n });\n\n let result = { code, map };\n for (const loaderFn of loaderFunctions) {\n result = await loaderFn(result);\n }\n\n return result;\n }\n\n getLoader(name) {\n return this.loaders.find((loader) => loader.name === name);\n }\n}\n\n/**\n * The options that could be `boolean` or `object`\n * We convert it to an object when it's truthy\n * Otherwise fallback to default value\n */\nfunction inferOption(option, defaultValue) {\n if (option === false) return false;\n if (option && typeof option === 'object') return option;\n return option ? {} : defaultValue;\n}\n\n/**\n * Recursively get the correct import order from rollup\n * We only process a file once\n *\n * @param {string} id\n * @param {Function} getModuleInfo\n * @param {Set<string>} seen\n */\nfunction getRecursiveImportOrder(id, getModuleInfo, seen = new Set()) {\n if (seen.has(id)) {\n return [];\n }\n\n seen.add(id);\n\n const result = [id];\n getModuleInfo(id).importedIds.forEach((importFile) => {\n result.push(...getRecursiveImportOrder(importFile, getModuleInfo, seen));\n });\n\n return result;\n}\n\n/* eslint import/no-anonymous-default-export: [2, {\"allowArrowFunction\": true}] */\nvar index = (options = {}) => {\n const filter = createFilter(options.include, options.exclude);\n const postcssPlugins = Array.isArray(options.plugins) ? options.plugins.filter(Boolean) : options.plugins;\n const { sourceMap } = options;\n const postcssLoaderOptions = {\n /** Inject CSS as `<style>` to `<head>` */\n inject: typeof options.inject === 'function' ? options.inject : inferOption(options.inject, {}),\n /** Extract CSS */\n extract: typeof options.extract === 'undefined' ? false : options.extract,\n /** CSS modules */\n onlyModules: options.modules === true,\n modules: inferOption(options.modules, false),\n namedExports: options.namedExports,\n /** Automatically CSS modules for .module.xxx files */\n autoModules: options.autoModules,\n /** Options for cssnano */\n minimize: inferOption(options.minimize, false),\n /** Postcss config file */\n config: inferOption(options.config, false),\n /** PostCSS target filename hint, for plugins that are relying on it */\n to: options.to,\n /** PostCSS options */\n postcss: {\n parser: options.parser,\n plugins: postcssPlugins,\n syntax: options.syntax,\n stringifier: options.stringifier,\n exec: options.exec,\n },\n };\n let use = ['sass', 'stylus', 'less'];\n if (Array.isArray(options.use)) {\n ({ use } = options);\n } else if (options.use !== null && typeof options.use === 'object') {\n use = [\n ['sass', options.use.sass || {}],\n ['stylus', options.use.stylus || {}],\n ['less', options.use.less || {}],\n ];\n }\n\n use.unshift(['postcss', postcssLoaderOptions]);\n\n const loaders = new Loaders({\n use,\n loaders: options.loaders,\n extensions: options.extensions,\n });\n\n const extracted = new Map();\n\n return {\n name: 'postcss',\n\n async transform(code, id) {\n if (!filter(id) || !loaders.isSupported(id)) {\n return null;\n }\n\n if (typeof options.onImport === 'function') {\n options.onImport(id);\n }\n\n const loaderContext = {\n id,\n sourceMap,\n dependencies: new Set(),\n warn: this.warn.bind(this),\n plugin: this,\n };\n\n const result = await loaders.process(\n {\n code,\n map: undefined,\n },\n loaderContext,\n );\n\n for (const dep of loaderContext.dependencies) {\n this.addWatchFile(dep);\n }\n\n if (postcssLoaderOptions.extract) {\n extracted.set(id, result.extracted);\n return {\n code: result.code,\n map: { mappings: '' },\n };\n }\n\n return {\n code: result.code,\n map: result.map || { mappings: '' },\n };\n },\n\n augmentChunkHash() {\n if (extracted.size === 0) return;\n const extractedValue = [...extracted].reduce(\n (object, [key, value]) => ({\n ...object,\n [key]: value,\n }),\n {},\n );\n return JSON.stringify(extractedValue);\n },\n\n async generateBundle(options_, bundle) {\n if (extracted.size === 0 || !(options_.dir || options_.file)) return;\n\n // TODO: support `[hash]`\n const dir = options_.dir || path.dirname(options_.file);\n const file =\n options_.file ||\n path.join(\n options_.dir,\n Object.keys(bundle).find((fileName) => bundle[fileName].isEntry),\n );\n const getExtracted = () => {\n let fileName = `${path.basename(file, path.extname(file))}.css`;\n if (typeof postcssLoaderOptions.extract === 'string') {\n fileName = path.isAbsolute(postcssLoaderOptions.extract)\n ? normalizePath(path.relative(dir, postcssLoaderOptions.extract))\n : normalizePath(postcssLoaderOptions.extract);\n }\n\n const concat = new Concat(true, fileName, '\\n');\n const entries = [...extracted.values()];\n const { modules, facadeModuleId } = bundle[normalizePath(path.relative(dir, file))];\n\n if (modules) {\n const moduleIds = getRecursiveImportOrder(facadeModuleId, this.getModuleInfo);\n entries.sort((a, b) => moduleIds.indexOf(a.id) - moduleIds.indexOf(b.id));\n }\n\n for (const result of entries) {\n const relative = normalizePath(path.relative(dir, result.id));\n const map = result.map || null;\n if (map) {\n map.file = fileName;\n }\n\n concat.add(relative, result.code, map);\n }\n\n let code = concat.content;\n\n if (sourceMap === 'inline') {\n code += `\\n/*# sourceMappingURL=data:application/json;base64,${Buffer.from(concat.sourceMap, 'utf8').toString(\n 'base64',\n )}*/`;\n } else if (sourceMap === true) {\n code += `\\n/*# sourceMappingURL=${path.basename(fileName)}.map */`;\n }\n\n return {\n code,\n map: sourceMap === true && concat.sourceMap,\n codeFileName: fileName,\n mapFileName: `${fileName}.map`,\n };\n };\n\n if (options.onExtract) {\n const shouldExtract = await options.onExtract(getExtracted);\n if (shouldExtract === false) {\n return;\n }\n }\n\n const { code: initialCode, codeFileName, map: initialMap, mapFileName } = getExtracted();\n let code = initialCode;\n let map = initialMap;\n // Perform cssnano on the extracted file\n if (postcssLoaderOptions.minimize) {\n const cssOptions = {};\n cssOptions.from = codeFileName;\n if (sourceMap === 'inline') {\n cssOptions.map = { inline: true };\n } else if (sourceMap === true && map) {\n cssOptions.map = { prev: map };\n cssOptions.to = codeFileName;\n }\n\n const cssnano = (await import('cssnano')).default;\n\n const result = await cssnano(postcssLoaderOptions.minimize).process(code, cssOptions);\n code = result.css;\n\n if (sourceMap === true && result.map && result.map.toString) {\n map = result.map.toString();\n }\n }\n\n this.emitFile({\n fileName: codeFileName,\n type: 'asset',\n source: code,\n });\n if (map) {\n this.emitFile({\n fileName: mapFileName,\n type: 'asset',\n source: map,\n });\n }\n },\n };\n};\n\nexport { index as default };\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stringImport.d.ts","sourceRoot":"","sources":["../../src/plugins/stringImport.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAErC;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,OAAO,EAAE;IAAE,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;CAAE,GAAG,MAAM,CAcpF"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { createFilter } from '@rollup/pluginutils';
|
|
2
|
+
/**
|
|
3
|
+
* Bundle the matching files as `export default 'string of file contents'`.
|
|
4
|
+
*/
|
|
5
|
+
export default function stringImport(options) {
|
|
6
|
+
const filter = createFilter(options.include);
|
|
7
|
+
return {
|
|
8
|
+
name: 'string-import',
|
|
9
|
+
transform(code, id) {
|
|
10
|
+
if (filter(id)) {
|
|
11
|
+
return {
|
|
12
|
+
code: `export default ${JSON.stringify(code)};`,
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=stringImport.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stringImport.js","sourceRoot":"","sources":["../../src/plugins/stringImport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGnD;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,OAAuC;IAC1E,MAAM,MAAM,GAAG,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAE7C,OAAO;QACL,IAAI,EAAE,eAAe;QAErB,SAAS,CAAC,IAAI,EAAE,EAAE;YAChB,IAAI,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC;gBACf,OAAO;oBACL,IAAI,EAAE,kBAAkB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG;iBAChD,CAAC;YACJ,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["import { createFilter } from '@rollup/pluginutils';\nimport type { Plugin } from 'rollup';\n\n/**\n * Bundle the matching files as `export default 'string of file contents'`.\n */\nexport default function stringImport(options: { include: string | string[] }): Plugin {\n const filter = createFilter(options.include);\n\n return {\n name: 'string-import',\n\n transform(code, id) {\n if (filter(id)) {\n return {\n code: `export default ${JSON.stringify(code)};`,\n };\n }\n },\n };\n}\n"]}
|
package/lib/rollup.d.ts
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
import type { Bundler } from '@ms-cloudpack/common-types';
|
|
2
|
+
import { type RollupOptions, type OutputOptions } from 'rollup';
|
|
3
|
+
export type RollupCapabilityConfig = {
|
|
4
|
+
inputOptions: RollupOptions;
|
|
5
|
+
outputOptions: OutputOptions;
|
|
6
|
+
};
|
|
2
7
|
export declare const rollup: Bundler;
|
|
3
8
|
//# sourceMappingURL=rollup.d.ts.map
|
package/lib/rollup.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rollup.d.ts","sourceRoot":"","sources":["../src/rollup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"rollup.d.ts","sourceRoot":"","sources":["../src/rollup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,OAAO,EAGR,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EAKL,KAAK,aAAa,EAClB,KAAK,aAAa,EACnB,MAAM,QAAQ,CAAC;AAOhB,MAAM,MAAM,sBAAsB,GAAG;IACnC,YAAY,EAAE,aAAa,CAAC;IAC5B,aAAa,EAAE,aAAa,CAAC;CAC9B,CAAC;AAIF,eAAO,MAAM,MAAM,EAAE,OAuDpB,CAAC"}
|
package/lib/rollup.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { processCapabilities } from '@ms-cloudpack/bundler-capabilities';
|
|
2
2
|
import { writeESMStubsInWorker } from '@ms-cloudpack/esm-stub-utilities';
|
|
3
|
-
import { rollup as runRollup, VERSION } from 'rollup';
|
|
3
|
+
import { rollup as runRollup, VERSION, } from 'rollup';
|
|
4
4
|
import { getRollupOptions } from './getRollupOptions.js';
|
|
5
5
|
import { normalizeRollupLoc } from './normalizeRollupLoc.js';
|
|
6
6
|
import { normalizeRollupOutput } from './normalizeRollupOutput.js';
|
package/lib/rollup.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rollup.js","sourceRoot":"","sources":["../src/rollup.ts"],"names":[],"mappings":"
|
|
1
|
+
{"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QAAQ,EAAE,CAAC,CAAC;IAC3F,CAAC;CACF,CAAC","sourcesContent":["import type {\n BundleMessage,\n Bundler,\n BundlerCapabilitiesOptions,\n InternalBundlerCapabilitiesOptions,\n} from '@ms-cloudpack/common-types';\nimport { processCapabilities } from '@ms-cloudpack/bundler-capabilities';\nimport { writeESMStubsInWorker } from '@ms-cloudpack/esm-stub-utilities';\nimport {\n rollup as runRollup,\n type RollupError,\n type RollupOutput,\n VERSION,\n type RollupOptions,\n type OutputOptions,\n} from 'rollup';\nimport { getRollupOptions } from './getRollupOptions.js';\nimport { normalizeRollupLoc } from './normalizeRollupLoc.js';\nimport { normalizeRollupOutput } from './normalizeRollupOutput.js';\nimport { rollupCapabilities } from './rollupCapabilities.js';\nimport { base64AssetExtensions } from '@ms-cloudpack/bundler-utilities';\n\nexport type RollupCapabilityConfig = {\n inputOptions: RollupOptions;\n outputOptions: OutputOptions;\n};\n\nconst bundlerName = 'rollup';\n\nexport const rollup: Bundler = {\n name: bundlerName,\n version: VERSION,\n bundle: async function (options, context) {\n const { newEntries, errors } = await writeESMStubsInWorker(options);\n if (errors?.length) {\n return { errors };\n }\n\n const { warnings, ...baseConfig } = getRollupOptions({ options, context, newEntries });\n\n const bundlerCapabilitiesOptions: BundlerCapabilitiesOptions = {\n 'asset-inline': { extensions: base64AssetExtensions },\n ...(options.bundlerCapabilities || {}),\n } satisfies InternalBundlerCapabilitiesOptions;\n\n const { inputOptions, outputOptions } = await processCapabilities<RollupCapabilityConfig>({\n bundlerName,\n baseConfig,\n bundlerCapabilitiesOptions,\n internalCapabilities: rollupCapabilities,\n bundlerCapabilitiesRegistry: context.config.bundlerCapabilitiesRegistry,\n });\n\n let output: RollupOutput;\n\n try {\n const result = await runRollup(inputOptions);\n output = await result.write(outputOptions);\n await result.close();\n } catch (e) {\n // This might only be a regular Error, but the extra RollupError properties accessed are optional\n const error = e as RollupError;\n const errorMessage: BundleMessage = {\n text: error.message,\n // remove the message from the stack\n notes: [{ text: error.stack?.includes(error.message) ? error.stack.split(error.message)[1].trim() : '' }],\n source: 'rollup',\n };\n\n if (error.id || error.loc?.file) {\n errorMessage.location = normalizeRollupLoc({\n // contains line, column, and possibly file\n loc: error.loc,\n // some errors only have the file here\n id: error.id,\n inputPath: options.inputPath,\n });\n }\n\n return { errors: [errorMessage] };\n }\n\n return normalizeRollupOutput({ options, inputOptions, outputOptions, output, warnings });\n },\n};\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ms-cloudpack/bundler-rollup",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.5",
|
|
4
4
|
"description": "Cloudpack's wrapper for the Rollup bundler",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -13,14 +13,25 @@
|
|
|
13
13
|
"import": "./lib/index.js"
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
|
+
"scripts": {
|
|
17
|
+
"api": "cloudpack-scripts api",
|
|
18
|
+
"build:watch": "cloudpack-scripts build-watch",
|
|
19
|
+
"build": "cloudpack-scripts build",
|
|
20
|
+
"lint:update": "cloudpack-scripts lint-update",
|
|
21
|
+
"lint": "cloudpack-scripts lint",
|
|
22
|
+
"test:update": "cloudpack-scripts test-update",
|
|
23
|
+
"test:watch": "cloudpack-scripts test-watch",
|
|
24
|
+
"test": "cloudpack-scripts test",
|
|
25
|
+
"prepack": "cp .npmignore lib/.npmignore"
|
|
26
|
+
},
|
|
16
27
|
"dependencies": {
|
|
17
28
|
"@ms-cloudpack/bundler-capabilities": "^0.4.8",
|
|
18
|
-
"@ms-cloudpack/bundler-utilities": "^0.7.
|
|
19
|
-
"@ms-cloudpack/common-types": "^0.
|
|
20
|
-
"@ms-cloudpack/esm-stub-utilities": "^0.15.
|
|
21
|
-
"@ms-cloudpack/package-utilities": "^13.2.
|
|
29
|
+
"@ms-cloudpack/bundler-utilities": "^0.7.3",
|
|
30
|
+
"@ms-cloudpack/common-types": "^0.33.0",
|
|
31
|
+
"@ms-cloudpack/esm-stub-utilities": "^0.15.33",
|
|
32
|
+
"@ms-cloudpack/package-utilities": "^13.2.3",
|
|
22
33
|
"@ms-cloudpack/path-string-parsing": "^1.2.7",
|
|
23
|
-
"@ms-cloudpack/path-utilities": "^3.
|
|
34
|
+
"@ms-cloudpack/path-utilities": "^3.2.0",
|
|
24
35
|
"@rollup/plugin-alias": "^5.0.1",
|
|
25
36
|
"@rollup/plugin-commonjs": "^28.0.4",
|
|
26
37
|
"@rollup/plugin-dynamic-import-vars": "^2.0.0",
|
|
@@ -42,7 +53,6 @@
|
|
|
42
53
|
"resolve": "^1.22.0",
|
|
43
54
|
"rollup": "^4.0.0",
|
|
44
55
|
"rollup-plugin-polyfill-node": "^0.13.0",
|
|
45
|
-
"rollup-plugin-string-import": "^1.2.6",
|
|
46
56
|
"sass": "^1.0.0",
|
|
47
57
|
"style-inject": "^0.3.0"
|
|
48
58
|
},
|
|
@@ -54,17 +64,6 @@
|
|
|
54
64
|
"@ms-cloudpack/test-utilities": "^0.5.0",
|
|
55
65
|
"lodash": "^4.17.21"
|
|
56
66
|
},
|
|
57
|
-
"scripts": {
|
|
58
|
-
"api": "cloudpack-scripts api",
|
|
59
|
-
"build:watch": "cloudpack-scripts build-watch",
|
|
60
|
-
"build": "cloudpack-scripts build",
|
|
61
|
-
"lint:update": "cloudpack-scripts lint-update",
|
|
62
|
-
"lint": "cloudpack-scripts lint",
|
|
63
|
-
"test:update": "cloudpack-scripts test-update",
|
|
64
|
-
"test:watch": "cloudpack-scripts test-watch",
|
|
65
|
-
"test": "cloudpack-scripts test",
|
|
66
|
-
"prepack": "cp .npmignore lib/.npmignore"
|
|
67
|
-
},
|
|
68
67
|
"files": [
|
|
69
68
|
"lib/**/!(*.test.*)"
|
|
70
69
|
]
|