Open utc8 opened 4 months ago
Successfully compile project with:
transpileOnly: true in ts-loader and "isolatedModules": false in tsconfig.json
transpileOnly: true
ts-loader
"isolatedModules": false
tsconfig.json
// src/index.ts import { JumpType } from "./enum"; console.log("JumpType.AUTO", JumpType.AUTO);
// src/enum.ts export const enum JumpType { INVALID = "INVALID", AUTO = "AUTO", CLICK = "CLICK", }
// webpack.config.js const path = require("path"); const webpack = require("webpack"); const rootDir = path.resolve(__dirname, "."); module.exports = { entry: path.join(rootDir, "src/index.ts"), cache: false, mode: 'production', optimization: { minimize: false, }, module: { rules: [ { test: /\.tsx?$/, use: [ { loader: "ts-loader", options: { transpileOnly: true, }, }, ], }, ] }, resolve: { extensions: ['.ts', '.tsx', '.js', '.json'], } };
// tsconfig.json { "compilerOptions": { "preserveConstEnums": false, "isolatedModules": false, "skipLibCheck": true, "skipDefaultLibCheck": true, "module": "esnext", "target": "es2015", "allowSyntheticDefaultImports": true, "baseUrl": "./", }, "exclude": ["**/node_modules/"] }
Expected Behaviour
Successfully compile project with:
transpileOnly: true
ints-loader
and"isolatedModules": false
intsconfig.json
Actual Behaviour
Steps to Reproduce the Problem