vue-const-enum-problem:演示vue Webpack编译问题。 Typescript const枚举未编译为...

Vue常量枚举问题该项目仅是为了证明Vue(截至2020年4月)在编译打字稿的const枚举方面存在问题。如您在tsconfig.json中看到的,我设置了“ preserveConstEnums”:false。这应该告诉TS编译器不要发出枚举的代码,而是在引用枚举成员的每个位置都使用枚举的数值。这没有发生。相反,编译器将引用保留给文件中的枚举,浏览器向其抛出引用错误。解决方案这已经解决了。非常感谢vue discord服务器上的@pikax将我指向vue上的。解决方案是将此代码添加到您的webpack配置中: chainWebpack: (config) = > { const rule = config.module.rule( ' ts ' ) ; rule.uses.delete( ' thread-loader ' ) ; rule
zip
vue-const-enum-problem-master.zip 预估大小:69个文件
folder
vue-const-enum-problem-master 文件夹
file
vue.config.js 2KB
file
package.json 2KB
file
jest.config.js 2KB
folder
tests 文件夹
folder
unit 文件夹
file
jest.setup.js 547B
folder
e2e 文件夹
folder
specs 文件夹
file
test.js 223B
folder
plugins 文件夹
file
index.js 908B
folder
support 文件夹
file
index.js 671B
file
commands.js 841B
file
.eslintrc.js 138B
file
output 115KB
file
LICENSE 1KB
file
.env 58B
folder
src 文件夹
file
shims-tsx.d.ts 306B
folder
plugins 文件夹
file
composition-api.ts 106B
file
vuetify.ts 110B
folder
assets 文件夹
file
sad.svg 3KB
file
logo.svg 539B
file
logo.png 7KB
folder
jest-helpers 文件夹
file
helpers.ts 631B
folder
api 文件夹
file
SkyCourtApi.d.ts 95B
file
shims-vue.d.ts 74B
file
main.ts 282B
folder
pages 文件夹
folder
app 文件夹
file
App.vue 520B
file
AppModel.ts 293B
folder
router 文件夹
file
routes.ts 296B
file
index.ts 643B
folder
store 文件夹
file
Readme.md 2KB
file
.eslintrc.js 1KB
file
tsconfig.json 1KB
folder
__mocks__ 文件夹
file
signalr-no-jquery.ts 623B
folder
vuetify 文件夹
folder
src 文件夹
folder
locale 文件夹
file
fr.ts 41B
file
en.ts 41B
folder
generators 文件夹
folder
new 文件夹
folder
component 文件夹
file
prompt.js 1KB
file
component.ejs.t 728B
file
unit.ejs.t 836B
folder
page 文件夹
file
prompt.js 581B
file
view.ejs.t 601B
file
unit.ejs.t 765B
file
.gitignore 250B
file
.browserslistrc 21B
file
signalR.js 119KB
file
cypress.json 50B
file
.prettierrc.js 133B
folder
public 文件夹
folder
img 文件夹
folder
icons 文件夹
file
apple-touch-icon-60x60.png 1KB
file
android-chrome-192x192.png 9KB
file
msapplication-icon-144x144.png 1KB
file
apple-touch-icon.png 5KB
file
apple-touch-icon-76x76.png 2KB
file
android-chrome-maskable-512x512.png 22KB
file
apple-touch-icon-152x152.png 4KB
file
safari-pinned-tab.svg 10KB
file
favicon-32x32.png 1KB
file
mstile-150x150.png 4KB
file
apple-touch-icon-120x120.png 3KB
file
android-chrome-maskable-192x192.png 6KB
file
favicon-16x16.png 799B
file
android-chrome-512x512.png 29KB
file
apple-touch-icon-180x180.png 5KB
file
robots.txt 24B
file
index.html 1KB
file
favicon.ico 4KB
file
README.md 2KB
file
yarn.lock 498KB
file
.eslintignore 26B
file
.gitattributes 66B
file
babel.config.js 66B
folder
.vscode 文件夹
file
launch.json 1KB
file
settings.json 4KB
file
extensions.json 2KB
...
zip 文件大小:353.88KB