UNPKG

tsj-jcrop

Version:

The Javascript cropping engine

68 lines (64 loc) 1.36 kB
import path from 'path'; import webpack from 'webpack'; import ExtractTextPlugin from 'extract-text-webpack-plugin'; //const { VueLoaderPlugin } = require('vue-loader'); const extractPlugin = new ExtractTextPlugin({ filename: 'style.css', disable: process.env.NODE_ENV === 'development', }); module.exports = { entry: { jcrop: './build/js/jcrop.js' }, devtool: 'source-map', module: { rules: [ { test: /\.scss$/, loader: [ 'style-loader', 'css-loader', 'sass-loader' ] }, { test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader' } ] }, output: { path: path.join(__dirname, 'dist'), filename: '[name].js', library: 'Jcrop' }, resolve: { alias: { } }, optimization: { /* splitChunks: { cacheGroups: { commons: { test: /[\\/]node_modules[\\/]/, name: "common", chunks: "all" } } } */ }, // this makes sure 'jQuery' is available to any jQuery plugin you might want // to load (including Foundation files) regardless of how they are written plugins: [ /* new VueLoaderPlugin(), new webpack.ProvidePlugin({ $: 'jquery', jQuery: 'jquery', 'window.jQuery': 'jquery' }) */ ] };