OSDN Git Service

Regular updates
[twpd/master.git] / _support / webpack.critical.js
1 const join = require('path').resolve
2 const webpack = require('webpack')
3
4 module.exports = {
5   context: join(__dirname, '..'),
6   entry: './_js/critical.js',
7   output: {
8     path: join(__dirname, '..', '_includes', '2017', 'critical'),
9     filename: 'critical.js'
10   },
11   module: {
12     rules: [
13       {
14         test: /\.js$/,
15         exclude: /node_modules/,
16         use: [
17           { loader: 'babel-loader' }
18         ]
19       }
20     ]
21   },
22   stats: 'minimal',
23   plugins: [
24     new webpack.EnvironmentPlugin({
25       NODE_ENV: 'production'
26     })
27   ]
28 }