diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2019-01-27 16:48:47 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2019-01-27 16:48:47 +0100 |
| commit | fb8a697cece8fc9f3b07f314d0988b6e354664bf (patch) | |
| tree | ea5a3bf4d630f6470b06d9b342cce9965728759d /webpack.splash.prod.js | |
| parent | b0b06be0defe97ef19cf4d0f3328db40d299e110 (diff) | |
splash page init, add obj2ply script
Diffstat (limited to 'webpack.splash.prod.js')
| -rw-r--r-- | webpack.splash.prod.js | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/webpack.splash.prod.js b/webpack.splash.prod.js new file mode 100644 index 00000000..78359a8c --- /dev/null +++ b/webpack.splash.prod.js @@ -0,0 +1,50 @@ +require('dotenv').config() + +const webpack = require('webpack') +const path = require('path') +const UglifyJsPlugin = require('uglifyjs-webpack-plugin') +// const CleanWebpackPlugin = require('clean-webpack-plugin') + +module.exports = { + entry: { + main: './client/splash/index.js', + }, + output: { + path: path.resolve(__dirname, 'site/assets/js/dist'), + filename: 'splash.js', + }, + plugins: [ + new webpack.DefinePlugin({ + 'process.env.NODE_ENV': '"production"', + 'process.env.S3_HOST': '"' + process.env.S3_HOST + '"', + 'process.env.API_HOST': '""', + }), + new UglifyJsPlugin(), + new webpack.optimize.AggressiveMergingPlugin() + ], + devtool: 'inline-source-map', + module: { + rules: [ + { + test: /\.css$/, + use: ['style-loader', 'css-loader'] + }, + { + test: /\.js$/, + // include: path.resolve(__dirname, 'client'), + exclude: /(node_modules|bower_components|build)/, + loader: 'babel-loader', + options: { + presets: ['env'], + plugins: [ + require('babel-plugin-transform-runtime'), + require('babel-plugin-transform-es2015-arrow-functions'), + require('babel-plugin-transform-object-rest-spread'), + require('babel-plugin-transform-class-properties'), + require('babel-plugin-transform-react-jsx'), + ] + } + } + ] + }, +}; |
