Skip to content

Commit

Permalink
manuel add es2020 supporting browser
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Pansch committed Mar 13, 2024
1 parent 7660cfb commit 4f1fe2c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions esbuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ const {compileWithCssVariables} = require('./cssVariables');
const {cssModules} = require('./cssModules');
const esbuild = require('esbuild');
const { version } = require('./package.json')
const { browserslistToTargets } = require('lightningcss');
const browserslist = require('browserslist');

const isProduction = process.argv.includes('--production');
const isE2ETesting = process.argv.includes('--e2e-testing');
Expand Down Expand Up @@ -77,7 +75,13 @@ const options = {
cssModules(
{
visitor: compileWithCssVariables(),
targets: browserslistToTargets(browserslist('last 2 versions')),
targets: { // only support es2020 browser
// only supports browserList format
chrome: (80 << 16), // 80
safari: (13 << 16) | (1 << 8), // 13.1
firefox: (72 << 16), // 72
edge: (80 << 16) // 80
},
drafts: {
nesting: true
}
Expand Down

0 comments on commit 4f1fe2c

Please sign in to comment.