Skip to content

Update ES Version #1142

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions packages/rollup-package.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ import importCss from 'rollup-plugin-import-css';
import properties from './uui-css/custom-properties.module.js'; // eslint-disable-line
// @ts-ignore-end

const esbuidOptions = { minify: true };
const tsconfigPath = new URL('../tsconfig.json', import.meta.url).pathname;

/**
* @type {import('rollup-plugin-esbuild').Options}
*/
const esbuildOptions = { tsconfig: tsconfigPath, target: 'es2022' }; // TODO: We have to specify the 'target' manually here, because the tsconfig is not used correctly by rollup-plugin-esbuild

const rootDir = new URL('../', import.meta.url).pathname;

Expand All @@ -32,7 +37,7 @@ const createEsModulesConfig = (entryPoints = []) => {
plugins: [
nodeResolve({ rootDir }),
importCss({ from: undefined }),
esbuild(),
esbuild(esbuildOptions),
processLitCSSPlugin(),
],
};
Expand Down Expand Up @@ -84,7 +89,10 @@ const createBundleConfig = (bundle, namespace) => {
importCss(),
processLitCSSPlugin(),
minifyHTML.default(),
esbuild(esbuidOptions),
esbuild({
...esbuildOptions,
minify: true,
}),
],
}
: undefined;
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"compilerOptions": {
"rootDirs": ["packages"],
"target": "esnext",
"target": "es2022",
"module": "esnext",
"noEmitOnError": true,
"lib": ["es2020", "dom", "dom.iterable"],
"lib": ["es2022", "dom", "dom.iterable"],
"esModuleInterop": false,
"declaration": true,
"emitDeclarationOnly": true,
Expand Down
7 changes: 6 additions & 1 deletion turbo.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{
"$schema": "https://turbo.build/schema.json",
"globalDependencies": ["tsconfig.json", "package.json", "package-lock.json"],
"globalDependencies": [
"tsconfig.json",
"package.json",
"package-lock.json",
"src/rollup-package.config.mjs"
],
"tasks": {
"build": {
"dependsOn": ["^build"],
Expand Down
Loading