How to use the vue-loader.VueLoaderPlugin function in vue-loader

To help you get started, we’ve selected a few vue-loader examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github lukeed / pwa / packages / preset-vue / index.js View on Github external
});

	// replace "style-loader" w/ "vue-style-loader"
	config.module.rules.forEach(obj => {
		if (Array.isArray(obj.use)) {
			obj.use = obj.use.map(x => x === 'style-loader' ? 'vue-style-loader' : x);
		}
	});

	config.module.rules.unshift({
		test: /\.vue$/,
		loader: 'vue-loader'
	});

	config.plugins.push(
		new VueLoaderPlugin({
			productionMode: opts.production
		})
	);
}
github viky-ai / viky-ai / webapp / config / webpack / environment.js View on Github external
const { environment } = require('@rails/webpacker')
const coffee =  require('./loaders/coffee')
const { VueLoaderPlugin } = require('vue-loader')
const vue = require('./loaders/vue')

// resolve-url-loader must be used before sass-loader
environment.loaders.get('sass').use.splice(-1, 0, {
  loader: 'resolve-url-loader'
});

environment.plugins.prepend('VueLoaderPlugin', new VueLoaderPlugin())
environment.loaders.prepend('vue', vue)
environment.loaders.prepend('coffee', coffee)
module.exports = environment
github kaishuu0123 / rebacklogs / config / webpack / environment.js View on Github external
//             name: 'vendor-commons',
//             chunks: 'initial'
//           }
//         }
//       }
//     }
//   })
// })

environment.plugins.append('Provide', new webpack.ProvidePlugin({
  $: 'jquery',
  jQuery: 'jquery',
  Popper: ['popper.js', 'default']
}))

environment.plugins.prepend('VueLoaderPlugin', new VueLoaderPlugin())
environment.loaders.prepend('vue', vue)
environment.plugins.append('ContextReplacement',
  new webpack.ContextReplacementPlugin(
    /moment[\/\\]locale$/,
    /ja|en-SG|en-au|en-ca|en-gb|en-ie|en-il|en-nz|de|fr|fu|zh-tw|zh-cn|zh-hk/
  )
)

module.exports = environment
github ledermann / pingcrm / config / webpack / environment.js View on Github external
const { environment } = require('@rails/webpacker')
const { VueLoaderPlugin } = require('vue-loader')
const vue = require('./loaders/vue')

const path = require('path')
environment.config.merge({
  resolve: {
    alias: {
      '@': path.resolve('app/javascript'),
      vue$: 'vue/dist/vue.runtime.esm.js',
    },
  },
})

environment.plugins.prepend('VueLoaderPlugin', new VueLoaderPlugin())
environment.loaders.prepend('vue', vue)
module.exports = environment
github kirillmurashov / vue-drag-resize / webpack.config.js View on Github external
const webpack = require('webpack');
const config = require('./config');
const CompressionPlugin = require("compression-webpack-plugin");
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
const { VueLoaderPlugin } = require('vue-loader');

let plugins = [];

plugins.push(new VueLoaderPlugin());

if(config.build.sourceMap){
    plugins.push(new webpack.SourceMapDevToolPlugin({
        filename: '[name].map'
    }))
}

plugins.push(new webpack.DefinePlugin({
    'process.env': {
        NODE_ENV: config.build.env
    }
}));


if(config.build.gzip){
    plugins.push(new CompressionPlugin({
github fjordllc / bootcamp / config / webpack / environment.js View on Github external
const { environment } = require('@rails/webpacker')
const { VueLoaderPlugin } = require('vue-loader')
const vue = require('./loaders/vue')
const pug = require('./loaders/pug')

environment.plugins.prepend('VueLoaderPlugin', new VueLoaderPlugin())
environment.loaders.prepend('vue', vue)
environment.loaders.prepend('pug', pug)
module.exports = environment
github ryanelian / instapack / bin / TypeScriptBuildEngine.js View on Github external
createWebpackPlugins() {
        const plugins = [];
        plugins.push(new vue_loader_1.VueLoaderPlugin());
        if (Object.keys(this.variables.env).length > 0) {
            plugins.push(new webpack.EnvironmentPlugin(this.variables.env));
        }
        return plugins;
    }
    createWebpackRules() {
github sanger / sequencescape / config / webpack / environment.js View on Github external
const { environment } = require('@rails/webpacker')
const { VueLoaderPlugin } = require('vue-loader')
const vue = require('./loaders/vue')

const resolveAliases = require('./resolve_aliases')

environment.plugins.prepend('VueLoaderPlugin', new VueLoaderPlugin())
environment.loaders.prepend('vue', vue)
environment.config.merge(resolveAliases)

module.exports = environment
github adr1enbe4udou1n / laravel-boilerplate / webpack.config.js View on Github external
function getEntryConfig (name, analyzerPort, alias = {}) {
  let plugins = [
    new VueLoaderPlugin(),
    new webpack.IgnorePlugin(/jsdom$/),
    new FriendlyErrorsWebpackPlugin(),
    new WebpackNotifierPlugin(),
    new MiniCssExtractPlugin({
      filename: production ? 'css/[name].[chunkhash].css' : 'css/[name].css'
    }),
    new ManifestPlugin({
      fileName: `manifest-${name}.json`,
      publicPath,
      writeToFileEmit: true
    })
  ]

  if (production) {
    plugins.push(...[
      new BundleAnalyzerPlugin({
github NastuzziSamy / vue-drag-resize-and-rotate / webpack.config.js View on Github external
const webpack = require('webpack');
const config = require('./config');
const CompressionPlugin = require("compression-webpack-plugin");
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
const { VueLoaderPlugin } = require('vue-loader');

let plugins = [];

plugins.push(new VueLoaderPlugin());

if(config.build.sourceMap){
    plugins.push(new webpack.SourceMapDevToolPlugin({
        filename: '[name].map'
    }))
}

plugins.push(new webpack.DefinePlugin({
    'process.env': {
        NODE_ENV: config.build.env
    }
}));


if(config.build.gzip){
    plugins.push(new CompressionPlugin({