We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
my component like this:
<template> ... </template> <script> //some code here </script> <style> .content{ width:500px; height:600px; } </style>
I want to use vue build create umd bundle.
when I use vue build,the result file index.css include the style content. like this:
include
vue build my-component.vue --prod --lib
But when I use vue build with webpack.config.js,the style(css) lost. like this:
lost
vue build my-component.vue --prod --lib --webpack webpack.config.js
My webpack.config.js:
var path = require('path'); var utils = require('./utils'); var webpack = require('webpack'); var merge = require('webpack-merge'); var webpackBaseConfig = require('./webpack.base.conf.js'); var ExtractTextPlugin = require('extract-text-webpack-plugin'); process.env.NODE_ENV = 'production'; module.exports = merge(webpackBaseConfig, { entry: './index.js', output: { path: path.resolve(__dirname, '../dist'), publicPath: '/dist/', filename: 'index.js', library: 'leaflet-map', libraryTarget: 'umd', umdNamedDefine: true }, externals: { vue: { root: 'Vue', commonjs: 'vue', commonjs2: 'vue', amd: 'vue' } }, plugins: [ // @todo new webpack.DefinePlugin({ 'process.env.NODE_ENV': '"production"' }), new ExtractTextPlugin({ filename: utils.assetsPath('css/[name].[contenthash].css') }) ] });
Is something missing from me?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
my component like this:
I want to use vue build create umd bundle.
when I use vue build,the result file index.css
include
the style content. like this:But when I use vue build with webpack.config.js,the style(css)
lost
. like this:My webpack.config.js:
Is something missing from me?
The text was updated successfully, but these errors were encountered: