Skip to content

Commit

Permalink
feat(angular-rollup): init test
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherPHolder committed May 28, 2024
1 parent 91fce76 commit ba5fd9d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion packages/angular-rollup/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"version": "0.0.1",
"dependencies": {
"@nx/devkit": "18.2.1",
"tslib": "^2.3.0"
"esbuild": "^0.19.2",
"rollup": "^4.18.0"
},
"type": "commonjs",
"main": "./src/index.js",
Expand Down
4 changes: 2 additions & 2 deletions packages/angular-rollup/src/executors/bundle/executor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const entryChunk = (entryPoint: string, statsJson: Metafile): string => {
return chunkName;
}

function getJson<T = any>(path: string) {
function getJson<T = unknown>(path: string) {
return JSON.parse(readFileSync(join(path), {encoding: 'utf-8'})) as T;
}

Expand All @@ -33,7 +33,7 @@ export default async function runExecutor(options: BundleExecutorSchema) {

const dir = join('tmp', options.outputPath);

const manualChunks: ManualChunksOption = (id, meta) => {
const manualChunks: ManualChunksOption = (id) => {
if (id.includes(mainChunk) || id.includes(polyfillsChunk)) return;
if (id.includes("chunk")) return "extra";
return 'vendor';
Expand Down

0 comments on commit ba5fd9d

Please sign in to comment.