1
0
Fork 0
mirror of https://github.com/Luzifer/browserphone.git synced 2024-11-08 13:50:05 +00:00
browserphone/webpack.config.js

64 lines
1.1 KiB
JavaScript
Raw Normal View History

2019-05-28 20:59:00 +00:00
const path = require('path')
const webpack = require('webpack')
const { VueLoaderPlugin } = require('vue-loader')
2019-05-28 20:59:00 +00:00
function resolve(dir) {
return path.join(__dirname, dir)
}
module.exports = {
entry: './src/main.js',
output: {
filename: 'app.js',
path: resolve('./dist'),
},
plugins: [
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringify('production'),
},
2019-05-28 20:59:00 +00:00
}),
new VueLoaderPlugin(),
],
resolve: {
fallback: {
util: require.resolve('util/'),
},
},
2019-05-28 20:59:00 +00:00
optimization: {
minimize: true,
2019-05-28 20:59:00 +00:00
},
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: [['@babel/preset-env', { targets: { browsers: ['>0.25%', 'not ie 11', 'not op_mini all'] } }]],
},
},
2019-05-28 20:59:00 +00:00
},
{
test: /\.vue$/,
loader: 'vue-loader',
},
],
},
2019-05-28 20:59:00 +00:00
}