webpack.config.js:
resolveLoader: {
alias: {
'copy': 'file-loader?name=[path][name].[ext]&context=./src',
}
},
When I was using javascript, this worked:
entry.js:
var index = require("copy!../src/index.html");
But I have moved to typescript, using (ts-loader), so I slightly modified what I was doing in entry.ts:
import * as index from 'copy!index.html';
but this now gives me an error:
ERROR in ./src/entry.ts
(3,24): error TS2307: Cannot find module 'copy!../src/index.html'.