mirror of
https://github.com/Luzifer/browserphone.git
synced 2024-11-08 13:50:05 +00:00
61 lines
1.1 KiB
JavaScript
61 lines
1.1 KiB
JavaScript
|
const path = require('path')
|
||
|
const webpack = require('webpack');
|
||
|
|
||
|
const VueLoaderPlugin = require('vue-loader/lib/plugin')
|
||
|
|
||
|
function resolve(dir) {
|
||
|
return path.join(__dirname, dir)
|
||
|
}
|
||
|
|
||
|
module.exports = {
|
||
|
entry: './src/main.js',
|
||
|
output: {
|
||
|
filename: 'app.js',
|
||
|
path: resolve('./dist'),
|
||
|
},
|
||
|
plugins: [
|
||
|
new webpack.optimize.OccurrenceOrderPlugin(),
|
||
|
new webpack.DefinePlugin({
|
||
|
'process.env': {
|
||
|
'NODE_ENV': JSON.stringify('production')
|
||
|
}
|
||
|
}),
|
||
|
new VueLoaderPlugin(),
|
||
|
],
|
||
|
optimization: {
|
||
|
minimize: true
|
||
|
},
|
||
|
module: {
|
||
|
rules: [
|
||
|
|
||
|
{
|
||
|
test: /\.(s?)css$/,
|
||
|
use: [
|
||
|
'style-loader',
|
||
|
'css-loader',
|
||
|
'sass-loader',
|
||
|
],
|
||
|
},
|
||
|
|
||
|
{
|
||
|
test: /\.js$/,
|
||
|
exclude: /(node_modules|bower_components)/,
|
||
|
use: {
|
||
|
loader: 'babel-loader',
|
||
|
options: {
|
||
|
presets: [
|
||
|
['env', { "targets": { "browsers": [">0.25%", "not ie 11", "not op_mini all"] } }]
|
||
|
]
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
|
||
|
{
|
||
|
test: /\.vue$/,
|
||
|
loader: 'vue-loader',
|
||
|
},
|
||
|
|
||
|
]
|
||
|
}
|
||
|
}
|