UNPKG

sails-hook-crud-admin

Version:

An admin for SailsJS

46 lines (44 loc) 1.06 kB
const webpack = require('webpack'); const path = require('path'); const UglifyJsPlugin = require('uglifyjs-webpack-plugin'); module.exports = { entry: './app/client.js', output: { path: path.resolve(__dirname, 'dist'), filename: 'client.js', publicPath: '/', }, target: 'web', devtool: 'source-map', plugins: [ new webpack.DefinePlugin({ __DEV__: false, __PROD__: true, 'process.env':{ 'NODE_ENV': JSON.stringify('production') }, }), new UglifyJsPlugin(), ], module: { loaders: [ { test: /\.js$/, exclude: /(node_modules|bower_components)/, loader: 'babel-loader' }, { test: /\.css$/, use: [ { loader: 'style-loader', }, { loader: 'css-loader' }, { loader: 'sass-loader' } ] }, { test: /\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)(\?v=[0-9]\.[0-9]\.[0-9])?$/, use: [{ loader: 'file-loader' }], }, ] } };