forked from parcel-bundler/lightningcss
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
25 lines (23 loc) · 684 Bytes
/
index.js
File metadata and controls
25 lines (23 loc) · 684 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
let parts = [process.platform, process.arch];
if (process.platform === 'linux') {
const {MUSL, family} = require('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');
}
if (process.env.CSS_TRANSFORMER_WASM) {
module.exports = require(`../pkg`);
} else {
try {
module.exports = require(`@parcel/css-${parts.join('-')}`);
} catch (err) {
module.exports = require(`../parcel-css.${parts.join('-')}.node`);
}
}
module.exports.browserslistToTargets = require('./browserslistToTargets');