mirror of
https://github.com/KevinMidboe/vue-js-modal.git
synced 2025-10-29 18:00:20 +00:00
Added build target without css, started using prettier intead of linting
This commit is contained in:
@@ -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'
|
||||
})
|
||||
}
|
||||
]
|
||||
}
|
||||
})
|
||||
50
build/webpack.ssr-no-css.config.js
Normal file
50
build/webpack.ssr-no-css.config.js
Normal 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')
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user