mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-23 01:58:29 +00:00
Implement simple Webpack setup
This commit is contained in:
25
samples/misc/Webpack/webpack.config.js
Normal file
25
samples/misc/Webpack/webpack.config.js
Normal file
@@ -0,0 +1,25 @@
|
||||
var path = require('path');
|
||||
var merge = require('extendify')({ isDeep: true, arrays: 'concat' });
|
||||
var devConfig = require('./webpack.config.dev');
|
||||
var prodConfig = require('./webpack.config.prod');
|
||||
var isDevelopment = process.env.ASPNET_ENV === 'Development';
|
||||
|
||||
module.exports = merge({
|
||||
resolve: {
|
||||
extensions: [ '', '.js', '.jsx', '.ts', '.tsx' ]
|
||||
},
|
||||
module: {
|
||||
loaders: [
|
||||
{ test: /\.ts(x?)$/, exclude: /node_modules/, loader: 'ts-loader' }
|
||||
],
|
||||
},
|
||||
entry: {
|
||||
main: ['./Clientside/App.ts']
|
||||
},
|
||||
output: {
|
||||
path: path.join(__dirname, 'wwwroot', 'dist'),
|
||||
filename: '[name].js',
|
||||
publicPath: '/dist/'
|
||||
},
|
||||
plugins: []
|
||||
}, isDevelopment ? devConfig : prodConfig);
|
||||
Reference in New Issue
Block a user