Initial structure

Generated with node-typescript-webpack
This commit is contained in:
Abhas
2018-06-21 15:06:07 +05:30
commit a7007048ab
20 changed files with 6410 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
const webpack = require("webpack");
const CopyWebpackPlugin = require('copy-webpack-plugin');
module.exports = {
devtool: 'inline-source-map',
entry: {
"index": './src/index.ts',
"index.min": './src/index.ts',
},
output: {
filename: 'dist/[name].js'
},
resolve: {
// Add `.ts` and `.tsx` as a resolvable extension.
extensions: ['.ts', '.tsx', '.js']
},
module: {
rules: [
{ test: /\.js$/, loader: 'babel-loader' },
// all files with a `.ts` or `.tsx` extension will be handled by `ts-loader`
{ test: /\.tsx?$/, loader: 'babel-loader!ts-loader' }
]
},
plugins: [
new webpack.optimize.UglifyJsPlugin({
include: /\.min\.js$/,
minimize: true
}) ,
new CopyWebpackPlugin([
{ from: 'demo/index.html', to: 'dist/' }
])
]
}