Created
April 5, 2020 11:50
-
-
Save oleh-zaporozhets/6ce45c0a5cec8b87c887f71b26ac66f8 to your computer and use it in GitHub Desktop.
Webpack for aliases
This file contains hidden or 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
const path = require('path'); | |
const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin'); | |
module.exports = { | |
mode: process.env.NODE_ENV, | |
devtool: 'none', | |
target: 'node', | |
context: path.resolve(__dirname, 'src'), | |
entry: 'index.ts', | |
output: { | |
filename: 'index.js', | |
path: path.resolve(__dirname, 'build'), | |
publicPath: 'build', | |
}, | |
resolve: { | |
plugins: [new TsconfigPathsPlugin()], | |
extensions: ['.ts', '.js'], | |
}, | |
module: { | |
rules: [{ test: /\.ts?$/, loader: 'ts-loader' }], | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment