Added build target without css, started using prettier intead of linting

This commit is contained in:
Yev Vlasenko
2017-12-28 18:27:58 +00:00
parent d302df7310
commit d3198e1388
11 changed files with 984 additions and 65 deletions

View File

@@ -1,24 +0,0 @@
const path = require('path')
const webpack = require('webpack')
const merge = require('webpack-merge')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const base = require('./webpack.srr.config')
module.exports = merge(base, {
plugins: [new ExtractTextPlugin('styles.css')],
output: {
filename: 'ssr.pure.js'
},
module: {
rules: [
{
test: /\.css$/,
use: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: 'css-loader'
})
}
]
}
})

View File

@@ -0,0 +1,50 @@
const path = require('path')
const webpack = require('webpack')
const merge = require('webpack-merge')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const UglifyJSPlugin = require('uglifyjs-webpack-plugin')
module.exports = {
target: 'node',
entry: path.resolve(__dirname, '../src/index.js'),
output: {
path: path.resolve(__dirname, '../dist'),
publicPath: '/dist/',
library: 'vue-js-modal',
libraryTarget: 'umd',
filename: 'ssr.nocss.js'
},
module: {
rules: [
{
test: /\.vue$/,
loader: 'vue-loader',
options: {
loaders: {
css: ExtractTextPlugin.extract({
use: 'css-loader',
fallback: 'vue-style-loader'
})
}
}
},
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/
}
]
},
plugins: [
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringify('production')
}
}),
new UglifyJSPlugin({
mangle: false,
beautify: true
}),
new ExtractTextPlugin('styles.css')
]
}