Skip to content

Commit 98f38f4

Browse files
committed
fix(build): copy dot files in assets
1 parent e9ea554 commit 98f38f4

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

addon/ng2/models/webpack-build-common.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ export function getWebpackCommonConfig(projectRoot: string, environment: string,
138138
}),
139139
new CopyWebpackPlugin([{
140140
context: path.resolve(appRoot, appConfig.assets),
141-
from: '**/*',
141+
from: { glob: '**/*', dot: true },
142142
to: path.resolve(projectRoot, appConfig.outDir, appConfig.assets)
143143
}])
144144
],

tests/e2e/e2e_workflow.spec.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -313,12 +313,14 @@ describe('Basic end-to-end Workflow', function () {
313313
it('moves all files that live inside `assets` into `dist`', function () {
314314
this.timeout(420000);
315315

316-
const tmpFile = path.join(process.cwd(), 'src', 'assets', 'test.abc');
317-
const tmpFileLocation = path.join(process.cwd(), 'dist', 'assets', 'test.abc');
318-
fs.writeFileSync(tmpFile, 'hello world');
316+
const dotGitIgnore = path.join(process.cwd(), 'dist', 'assets', '.gitignore');
317+
const testFile = path.join(process.cwd(), 'src', 'assets', 'test.abc');
318+
const builtTestFile = path.join(process.cwd(), 'dist', 'assets', 'test.abc');
319+
fs.writeFileSync(testFile, 'hello world');
319320

320321
sh.exec(`${ngBin} build`);
321-
expect(existsSync(tmpFileLocation)).to.be.equal(true);
322+
expect(existsSync(dotGitIgnore)).to.be.equal(true);
323+
expect(existsSync(builtTestFile)).to.be.equal(true);
322324
});
323325

324326
// Mobile mode doesn't have styles

0 commit comments

Comments
 (0)