网页包5 Typescript键入缓存失败
我有一个带有typescript的基本项目 它包括几个ts文件和html代码。我正在尝试使用缓存设置重建。我必须使用基于文件的缓存(这是一项要求)。 问题是重建后我找不到打字 tsconfig.json网页包5 Typescript键入缓存失败,typescript,caching,webpack,Typescript,Caching,Webpack,我有一个带有typescript的基本项目 它包括几个ts文件和html代码。我正在尝试使用缓存设置重建。我必须使用基于文件的缓存(这是一项要求)。 问题是重建后我找不到打字 tsconfig.json { "compilerOptions": { "outDir": "./build", "declarationDir": "./build/types", "
{
"compilerOptions": {
"outDir": "./build",
"declarationDir": "./build/types",
"moduleResolution": "node",
"sourceMap": true,
"noImplicitAny": true,
"module": "commonjs",
"target": "es5",
"declaration": true,
"lib": [
"es6",
"es7",
"dom"
]
}
}
网页包配置
module.exports = {
entry: {index: "./src/index.ts"},
cache: { type: 'filesystem' },
....
output: {
filename: "[name].js",
libraryTarget: "commonjs2",
path: path.resolve("./build"),
},
plugins: [
new CleanWebpackPlugin(),
....
],
module: {
rules: [
{
test: /\.ts$/,
include: /src/,
use:
[
{
loader: 'ng-annotate-loader',
options: {
add: true
}
},
{
loader: 'ts-loader',
options: {
onlyCompileBundledFiles: true
}
},
]
},
....
]
}
};
如果我做构建,我会将js代码捆绑在“types”文件夹中的output+typings上。
“重建类型”文件夹消失后。
对于WebpackV4,它运行良好