forked from BKWLD/vue-ssr-carousel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.coffee
40 lines (32 loc) · 986 Bytes
/
webpack.config.coffee
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
38
39
40
webpack = require 'webpack'
VueLoaderPlugin = require 'vue-loader/lib/plugin'
MiniCssExtractPlugin = require 'mini-css-extract-plugin'
nodeExternals = require 'webpack-node-externals'
module.exports = (env, argv) ->
# Build for production but don't uglify so the transpiled code is more
# readable
mode: 'production'
optimization: minimize: false
entry: index: './src/ssr-carousel.vue'
resolve: extensions: ['.js', '.coffee', '.vue']
module: rules: [
{ test: /\.coffee$/, loader: 'babel-loader!coffee-loader' }
{ test: /\.pug$/, loader: 'pug-plain-loader' }
{ test: /\.vue$/, loader: 'vue-loader' }
{ test: /\.styl(us)?$/, use: [
MiniCssExtractPlugin.loader,
'css-loader',
'postcss-loader'
'stylus-loader'
]}
]
plugins: [
new VueLoaderPlugin
new MiniCssExtractPlugin filename: 'index.css'
]
output:
path: __dirname
libraryTarget: 'commonjs2'
filename: '[name].js'
# Every non-relative module is external
externals: [nodeExternals()]