Created
November 13, 2019 16:27
-
-
Save ofcRS/b15f3e40a7c60233aeb8c11847a39db8 to your computer and use it in GitHub Desktop.
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'); | |
| module.exports = env => { | |
| const mode = env.production ? 'production' : 'development'; | |
| const isProd = mode === 'production'; | |
| return ({ | |
| mode, | |
| entry: path.resolve(__dirname, 'src/testwebpack.ts'), | |
| target: 'node', | |
| optimization: { | |
| minimize: false/*isProd*/, | |
| }, | |
| module: { | |
| rules: [ | |
| { | |
| test: /\.ts$/, | |
| exclude: /(node_modules|bower_components)/, | |
| loader: 'babel-loader', | |
| }, | |
| ] | |
| }, | |
| resolve: { | |
| extensions: ['.ts'], | |
| }, | |
| output: { | |
| filename: 'bundle.js', | |
| path: path.resolve(__dirname, 'dist'), | |
| }, | |
| }); | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment