Skip to content
Closed
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
3 changes: 2 additions & 1 deletion addon/ng2/models/webpack-build-common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ export function getWebpackCommonConfig(projectRoot: string, environment: string,
}),
new CopyWebpackPlugin([{
context: path.resolve(appRoot, appConfig.assets),
from: '**/*',
from: { glob: '**/*', dot: true },
ignore: [ '.gitignore' ],
to: path.resolve(projectRoot, appConfig.outDir, appConfig.assets)
}])
],
Expand Down
14 changes: 10 additions & 4 deletions tests/e2e/e2e_workflow.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,12 +313,18 @@ describe('Basic end-to-end Workflow', function () {
it('moves all files that live inside `assets` into `dist`', function () {
this.timeout(420000);

const tmpFile = path.join(process.cwd(), 'src', 'assets', 'test.abc');
const tmpFileLocation = path.join(process.cwd(), 'dist', 'assets', 'test.abc');
fs.writeFileSync(tmpFile, 'hello world');
const dotFile = path.join(process.cwd(), 'src', 'assets', '.file');
const distDotFile = path.join(process.cwd(), 'dist', 'assets', '.file');
fs.writeFileSync(dotFile, '');
const testFile = path.join(process.cwd(), 'src', 'assets', 'test.abc');
const distTestFile = path.join(process.cwd(), 'dist', 'assets', 'test.abc');
fs.writeFileSync(testFile, 'hello world');
const distDotGitIgnore = path.join(process.cwd(), 'dist', 'assets', '.gitignore');

sh.exec(`${ngBin} build`);
expect(existsSync(tmpFileLocation)).to.be.equal(true);
expect(existsSync(distDotFile)).to.be.equal(true);
expect(existsSync(distTestFile)).to.be.equal(true);
expect(existsSync(distDotGitIgnore)).to.be.equal(false);
});

// Mobile mode doesn't have styles
Expand Down