改变打包出来的amd模块,增加amd模块的名字 (#28)

* add amd name
This commit is contained in:
Yao 2017-05-11 15:58:12 +08:00 committed by GitHub
parent 329df09e22
commit 2feeb67b3f
5 changed files with 14 additions and 4 deletions

View File

@ -9,7 +9,8 @@ config.entry = {
config.output = { config.output = {
filename: './lib/[name].js', filename: './lib/[name].js',
library: 'vant', library: 'vant',
libraryTarget: 'umd' libraryTarget: 'umd',
umdNamedDefine: true
}; };
config.externals = { config.externals = {

View File

@ -18,7 +18,8 @@ config.externals = {
config.output = { config.output = {
path: path.join(__dirname, '../lib'), path: path.join(__dirname, '../lib'),
filename: '[name].js', filename: '[name].js',
libraryTarget: 'umd' libraryTarget: 'umd',
umdNamedDefine: true
}; };
module.exports = config; module.exports = config;

View File

@ -39,7 +39,8 @@ module.exports = {
output: { output: {
path: path.join(__dirname, '../docs/dist'), path: path.join(__dirname, '../docs/dist'),
publicPath: '/', publicPath: '/',
filename: '[name].js' filename: '[name].js',
umdNamedDefine: true
}, },
devServer: { devServer: {
historyApiFallback: { historyApiFallback: {

View File

@ -7,7 +7,8 @@ module.exports = merge(devConfig, {
output: { output: {
path: path.join(__dirname, '../docs/dist'), path: path.join(__dirname, '../docs/dist'),
publicPath: '/zanui/vue', publicPath: '/zanui/vue',
filename: '[name].[hash:8].js' filename: '[name].[hash:8].js',
umdNamedDefine: true
}, },
devtool: false, devtool: false,
plugins: [ plugins: [

View File

@ -5102,6 +5102,12 @@ postcss-convert-values@^2.3.4:
postcss "^5.0.11" postcss "^5.0.11"
postcss-value-parser "^3.1.2" postcss-value-parser "^3.1.2"
postcss-css-reset@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/postcss-css-reset/-/postcss-css-reset-1.0.2.tgz#769f2d62d3f1f76e2600fb4f79066399bebe2bd8"
dependencies:
postcss "^5.0.19"
postcss-custom-media@^5.0.0: postcss-custom-media@^5.0.0:
version "5.0.1" version "5.0.1"
resolved "https://registry.yarnpkg.com/postcss-custom-media/-/postcss-custom-media-5.0.1.tgz#138d25a184bf2eb54de12d55a6c01c30a9d8bd81" resolved "https://registry.yarnpkg.com/postcss-custom-media/-/postcss-custom-media-5.0.1.tgz#138d25a184bf2eb54de12d55a6c01c30a9d8bd81"