Configure webpack and tsconfig

jh-changes
Shin'ya Ueoka 6 years ago
parent fa0325bb8a
commit 71f3a1ea2d
  1. 2
      package.json
  2. 1
      tsconfig.json
  3. 16
      webpack.config.js

@ -6,7 +6,7 @@
"build": "NODE_ENV=production webpack --mode production --progress --display-error-details",
"package": "npm run build && script/package",
"lint": "eslint --ext .js,.jsx,.ts,.tsx src",
"type-checks": "tsc",
"type-checks": "tsc --noEmit",
"test": "karma start",
"test:e2e": "mocha --timeout 8000 e2e"
},

@ -5,7 +5,6 @@
"lib": ["es6", "dom", "es2017"],
"allowJs": true,
"checkJs": true,
"noEmit": true,
"jsx": "react",
"sourceMap": true,
"outDir": "./build",

@ -20,21 +20,9 @@ config = {
module: {
rules: [
{
test: [ /\.js$/, /\.jsx$/, /\.ts$/, /\.tsx$/],
test: [ /\.ts$/, /\.tsx$/],
exclude: /node_modules/,
loader: 'babel-loader',
options: {
presets: [
{
plugins: [
["@babel/plugin-proposal-decorators", { "legacy": true }],
'@babel/plugin-proposal-class-properties'
]
},
'@babel/react',
'@babel/preset-typescript'
]
},
loader: 'ts-loader'
},
{
test: /\.css$/,