-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: ts-loader를 이용하기 위한 webpack.local.js 추가
- Loading branch information
1 parent
aa7ebcf
commit e35e033
Showing
4 changed files
with
53 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
const { merge } = require('webpack-merge'); | ||
const common = require('./webpack.common'); | ||
const path = require('path'); | ||
const webpack = require('webpack'); | ||
const dotenv = require('dotenv'); | ||
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin'); | ||
|
||
dotenv.config({ | ||
path: path.join(__dirname, './.env.development'), | ||
}); | ||
|
||
module.exports = merge(common, { | ||
mode: 'development', | ||
devtool: 'eval-cheap-module-source-map', | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.(js|jsx|ts|tsx)?$/, | ||
loader: 'ts-loader', | ||
exclude: /node_modules/, | ||
options: { | ||
transpileOnly: true, | ||
}, | ||
}, | ||
], | ||
}, | ||
plugins: [ | ||
new ForkTsCheckerWebpackPlugin(), | ||
new webpack.DefinePlugin({ | ||
'process.env': JSON.stringify(process.env), | ||
}), | ||
], | ||
optimization: { | ||
minimize: true, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters