mirror of
				https://github.com/KevinMidboe/vue-js-modal.git
				synced 2025-10-29 18:00:20 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			51 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			51 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
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')
 | 
						|
  ]
 | 
						|
}
 |