Skip to content

Any webpack example?  #81

@mokone91

Description

@mokone91

Hi!
im working on components lib and truing to make it vue2/3 compatible using this solution.
But i faced with issue with vue3 installation.. in vue2 env everything working fine!
Here is my build webpack config:

import merge from 'webpack-merge';
import { Configuration } from 'webpack';
import { CleanWebpackPlugin } from 'clean-webpack-plugin';
import common from './webpack.base.config';
const { watch } = require('minimist')(process.argv.slice(2));

const path = require('path');


export default merge<Configuration>(common, {
  entry: {
    main: './src/index.ts',
  },
  output: {
    filename: 'index.js',
    path: path.resolve(__dirname, 'dist'),
    library: {
      name: 'TestLib',
      type: 'umd',
    },
  },
  devtool: 'source-map',
  mode: watch ? 'development' : 'production',
  bail: watch ? false : true,
  plugins: [
    new CleanWebpackPlugin(),
  ],
  externals: {
    vue: 'vue',
    'vue-demi': 'vue-demi',
    'lodash': 'lodash',
  },
});

on client side im using default vue-cli-service serve^ without additional settings
but in vue3 environment i got:
image

seems problem somewhere near webpack build config, maybe somebody can share some webpack config examples?
Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions