How to use the vue-loader/lib/plugin 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 nuxt / vue-meta / test / utils / build.js View on Github external
node: {
      __dirname: true
    },
    optimization: {
      splitChunks: {
        cacheGroups: {
          vendor: {
            test: /[\\/]node_modules[\\/]/,
            name: 'vendor',
            chunks: 'all'
          }
        }
      }
    },
    plugins: [
      new VueLoaderPlugin(),
      new webpack.DefinePlugin({
        'process.env': {
          // make sure our simple polyfills are enabled
          'NODE_ENV': '"test"'
        }
      }),
      new CopyWebpackPlugin([
        { from: path.join(path.dirname(config.entry), 'static') }
      ])
    ],
    resolve: {
      alias: {
        'vue': 'vue/dist/vue.esm.js',
        'vue-meta': getVueMetaPath(true)
      }
    },
github storybookjs / storybook / app / vue / src / server / framework-preset-vue.ts View on Github external
export function webpack(config: Configuration) {
  return {
    ...config,
    plugins: [...config.plugins, new VueLoaderPlugin()],
    module: {
      ...config.module,
      rules: [
        ...config.module.rules,
        {
          test: /\.vue$/,
          loader: require.resolve('vue-loader'),
          options: {},
        },
      ],
    },
    resolve: {
      ...config.resolve,
      extensions: [...config.resolve.extensions, '.vue'],
      alias: {
        ...config.resolve.alias,