forked from TahaSh/vue-paginate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
57 lines (48 loc) · 1.18 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
const path = require('path')
const webpack = require('webpack')
module.exports = {
devtool: 'inline-source-map',
entry: path.join(__dirname, '/examples/main.js'),
output: {
path: path.join(__dirname, '/examples/__build__'),
filename: 'app.js',
publicPath: '/examples/__build__/'
},
module: {
loaders: [
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel-loader'
},
{
test: /\.vue$/,
loader: 'vue',
}
]
},
vue: {
loaders: {
scss: 'vue-style-loader!css-loader!sass-loader', // <style lang="scss">
sass: 'vue-style-loader!css-loader!sass-loader?indentedSyntax' // <style lang="sass">
}
},
resolve: {
extensions: ['', '.js', '.vue'],
fallback: [path.join(__dirname, '../node_modules')],
alias: {
'vue': 'vue/dist/vue.common.js',
'vue-paginate': path.join(__dirname, 'src/index')
}
},
// Expose __dirname to allow automatically setting basename.
context: __dirname,
node: {
__dirname: true
},
plugins: [
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'development')
})
]
}