Skip to content
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

Replace rollup-plugin-ts with @rollup/plugin-typescript #1510

Merged
merged 2 commits into from
Jul 3, 2023
Merged
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
5 changes: 1 addition & 4 deletions packages/router/babel.config.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{
"presets": [["@babel/preset-typescript"]],
"plugins": [
"@embroider/addon-dev/template-colocation-plugin",
["@babel/plugin-proposal-decorators", { "legacy": true }],
"@babel/plugin-proposal-class-properties"
"@babel/plugin-transform-typescript",
]
}
10 changes: 4 additions & 6 deletions packages/router/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,11 @@
},
"devDependencies": {
"@babel/core": "^7.17.0",
"@babel/preset-typescript": "^7.18.6",
"@babel/plugin-proposal-class-properties": "^7.16.7",
"@babel/plugin-proposal-decorators": "^7.17.0",
"@babel/plugin-syntax-decorators": "^7.17.0",
"@babel/plugin-transform-typescript": "^7.8.7",
"@embroider/addon-dev": "workspace:^",
"@embroider/macros": "workspace:*",
"@rollup/plugin-babel": "^5.3.1",
"@rollup/plugin-typescript": "^11.1.2",
"@tsconfig/ember": "^1.0.0",
"@typescript-eslint/eslint-plugin": "^5.59.5",
"@typescript-eslint/parser": "^5.59.5",
Expand All @@ -54,8 +53,7 @@
"eslint-plugin-prettier": "^4.0.0",
"prettier": "^2.5.1",
"rollup": "^3.23.0",
"rollup-plugin-copy": "^3.4.0",
"rollup-plugin-ts": "^3.2.0",
"tslib": "^2.6.0",
"typescript": "^4.9.0"
},
"peerDependencies": {
Expand Down
10 changes: 5 additions & 5 deletions packages/router/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import typescript from 'rollup-plugin-ts';
import copy from 'rollup-plugin-copy';
import typescript from '@rollup/plugin-typescript';
import { Addon } from '@embroider/addon-dev/rollup';
import { babel } from '@rollup/plugin-babel';

const addon = new Addon({
srcDir: 'src',
Expand All @@ -24,11 +24,11 @@ export default {

// compile TypeScript to latest JavaScript, including Babel transpilation
typescript({
transpiler: 'babel',
browserslist: false,
transpileOnly: true,
noForceEmit: true,
}),

babel({ extensions: ['.ts'], babelHelpers: 'inline' }),

// Ensure that standalone .hbs files are properly integrated as Javascript.
addon.hbs(),

Expand Down
5 changes: 4 additions & 1 deletion packages/router/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
"extends": "@tsconfig/ember/tsconfig.json",
"include": ["src/**/*"],
"compilerOptions": {
"typeRoots": ["types"]
"typeRoots": ["types"],
"emitDeclarationOnly": true,
"noEmit": false,
"declarationDir": "dist"
}
}
Loading