diff --git a/src/sys/deno/deno-copy-tasks.ts b/src/sys/deno/deno-copy-tasks.ts index 71b8b29e6e6..eaeac7f2d8c 100644 --- a/src/sys/deno/deno-copy-tasks.ts +++ b/src/sys/deno/deno-copy-tasks.ts @@ -1,6 +1,6 @@ import type * as d from '../../declarations'; import type { Deno } from '../../../types/lib.deno'; -import { buildError, catchError, flatOne, normalizePath, unique } from '@utils'; +import { buildError, catchError, flatOne, normalizePath } from '@utils'; import { basename, dirname, expandGlob, isGlob, isAbsolute, join, resolve } from './deps'; export async function denoCopyTasks(deno: typeof Deno, copyTasks: Required[], srcDir: string) { @@ -13,8 +13,6 @@ export async function denoCopyTasks(deno: typeof Deno, copyTasks: Required processGlobs(task, srcDir)))); - copyTasks = unique(copyTasks, task => task.dest); - const allCopyTasks: d.CopyTask[] = []; // figure out all the file copy tasks we'll have diff --git a/src/sys/node/node-copy-tasks.ts b/src/sys/node/node-copy-tasks.ts index 8f890c58285..27ec5d333e9 100644 --- a/src/sys/node/node-copy-tasks.ts +++ b/src/sys/node/node-copy-tasks.ts @@ -1,5 +1,5 @@ import * as d from '../../declarations'; -import { buildError, catchError, flatOne, isGlob, normalizePath, unique } from '@utils'; +import { buildError, catchError, flatOne, isGlob, normalizePath } from '@utils'; import { copyFile, mkdir, readdir, stat } from './node-fs-promisify'; import path from 'path'; import glob from 'glob'; @@ -14,8 +14,6 @@ export async function nodeCopyTasks(copyTasks: Required[], srcDir: s try { copyTasks = flatOne(await Promise.all(copyTasks.map(task => processGlobs(task, srcDir)))); - copyTasks = unique(copyTasks, task => task.dest); - const allCopyTasks: d.CopyTask[] = []; // figure out all the file copy tasks we'll have diff --git a/test/end-to-end/src/car-detail/assets-a/file-1.txt b/test/end-to-end/src/car-detail/assets-a/file-1.txt new file mode 100644 index 00000000000..4036f0fd4d3 --- /dev/null +++ b/test/end-to-end/src/car-detail/assets-a/file-1.txt @@ -0,0 +1 @@ +file-1.txt \ No newline at end of file diff --git a/test/end-to-end/src/car-detail/car-detail.tsx b/test/end-to-end/src/car-detail/car-detail.tsx index fd44f4d4b4d..8bd53c97613 100644 --- a/test/end-to-end/src/car-detail/car-detail.tsx +++ b/test/end-to-end/src/car-detail/car-detail.tsx @@ -1,9 +1,9 @@ import { Component, Prop, h } from '@stencil/core'; import { CarData } from '../car-list/car-data'; - @Component({ - tag: 'car-detail' + tag: 'car-detail', + assetsDirs: ['assets-a'], }) export class CarDetail { @Prop() car: CarData; diff --git a/test/end-to-end/src/car-list/assets-a/file-2.txt b/test/end-to-end/src/car-list/assets-a/file-2.txt new file mode 100644 index 00000000000..5042efb8f3b --- /dev/null +++ b/test/end-to-end/src/car-list/assets-a/file-2.txt @@ -0,0 +1 @@ +file-2.txt \ No newline at end of file diff --git a/test/end-to-end/src/car-list/car-list.tsx b/test/end-to-end/src/car-list/car-list.tsx index 802b4d93ccb..138e49432cc 100644 --- a/test/end-to-end/src/car-list/car-list.tsx +++ b/test/end-to-end/src/car-list/car-list.tsx @@ -9,7 +9,8 @@ import { CarData } from './car-data'; @Component({ tag: 'car-list', styleUrl: 'car-list.css', - shadow: true + shadow: true, + assetsDirs: ['assets-a'], }) export class CarList { @Prop() cars: CarData[]; diff --git a/test/end-to-end/src/dom-api/assets-b/file-3.txt b/test/end-to-end/src/dom-api/assets-b/file-3.txt new file mode 100644 index 00000000000..89dfefbca44 --- /dev/null +++ b/test/end-to-end/src/dom-api/assets-b/file-3.txt @@ -0,0 +1 @@ +file-3.txt \ No newline at end of file diff --git a/test/end-to-end/src/dom-api/dom-api.tsx b/test/end-to-end/src/dom-api/dom-api.tsx index 7090d04d73d..4bbaf38ea64 100644 --- a/test/end-to-end/src/dom-api/dom-api.tsx +++ b/test/end-to-end/src/dom-api/dom-api.tsx @@ -1,10 +1,10 @@ import { Component, h } from '@stencil/core'; @Component({ - tag: 'dom-api' + tag: 'dom-api', + assetsDirs: ['assets-b'], }) export class DomApiCmp { - render() { return ( diff --git a/test/end-to-end/test-end-to-end-dist.js b/test/end-to-end/test-end-to-end-dist.js index bee644b3412..17d51319228 100644 --- a/test/end-to-end/test-end-to-end-dist.js +++ b/test/end-to-end/test-end-to-end-dist.js @@ -32,6 +32,10 @@ fs.accessSync(path.join(typesDir, 'car-list', 'car-list.d.ts')); const wwwDir = path.join(__dirname, 'www'); fs.accessSync(path.join(wwwDir, 'build', 'endtoend.js')); fs.accessSync(path.join(wwwDir, 'build', 'endtoend.esm.js')); +fs.accessSync(path.join(wwwDir, 'build', 'endtoend.css')); +fs.accessSync(path.join(wwwDir, 'build', 'assets-a/file-1.txt')); +fs.accessSync(path.join(wwwDir, 'build', 'assets-a/file-2.txt')); +fs.accessSync(path.join(wwwDir, 'build', 'assets-b/file-3.txt')); fs.accessSync(path.join(wwwDir, 'index.html')); fs.accessSync(path.join(__dirname, 'dist-react', 'components.ts'));