forked from parcel-bundler/lightningcss
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.mjs
More file actions
32 lines (28 loc) · 926 Bytes
/
index.mjs
File metadata and controls
32 lines (28 loc) · 926 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
let parts = [process.platform, process.arch];
if (process.platform === 'linux') {
const {MUSL, family} = await import('detect-libc');
if (family === MUSL) {
parts.push('musl');
} else if (process.arch === 'arm') {
parts.push('gnueabihf');
} else {
parts.push('gnu');
}
} else if (process.platform === 'win32') {
parts.push('msvc');
}
let default_export;
if (process.env.CSS_TRANSFORMER_WASM) {
default_export = await import('./pkg/parcel_css_node.js');
} else {
const {createRequire} = await import('module');
const require = createRequire(import.meta.url);
try {
default_export = require(`@parcel/css-${parts.join('-')}`);
} catch (err) {
default_export = require(`../parcel-css.${parts.join('-')}.node`);
}
}
export default default_export;
import browserslistToTargetsImport from './browserslistToTargets.js';
export const browserslistToTargets = browserslistToTargetsImport;