-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
37 lines (36 loc) · 1.11 KB
/
webpack.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
var webpack = require('webpack');
var path = require('path');
var precss = require('precss');
var autoprefixer = require('autoprefixer');
var cssnano = require('cssnano');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
entry: './app/main.tsx',
output: {
path: path.join(__dirname, '/app'),
filename: '[name].min.js',
},
modules: [path.resolve(__dirname, "app"), "node_modules"],
descriptionFiles: ["package.json"],
resolve: {
extensions: ['', '.ts', '.tsx', '.js']
},
module: {
loaders: [{
test: /\.ts[x]$/,
loader: 'ts-loader'
}, {
test: /\.css$/,
loader: ExtractTextPlugin.extract('style-loader', 'css-loader?modules&importLoaders=1&localIdentName=[name]__[local]__[hash:base64:5]!postcss-loader')
}]
},
postcss: [precss(), autoprefixer(), cssnano()],
plugins: [
new ExtractTextPlugin('main.min.css')
// ,new webpack.optimize.UglifyJsPlugin({
// compress: {
// warnings: false
// }
// })
]
};