module.exports = {
// 修改 src 为 examples
pages: {
index: {
entry: 'examples/main.js',
template: 'public/index.html',
filename: 'index.html'
}
},
// 强制内联CSS
css: { extract: false },
// 扩展 webpack 配置,使 packages 加入编译
chainWebpack: config => {
config.module
.rule('js')
.include
.add(__dirname + 'packages')
.end()
.use('babel')
.loader('babel-loader')
.tap(options => {
// 修改它的选项...
return options
})
}
}
其中 :.add(‘packages’)改为 .add(__dirname + ‘packages’)
上种情况是在按照这个配置之后 https://www.jb51.net/article/148692.htm 的报错的处理
403 Forbidden - PUT http://registry.npmjs.org/custom-el-ui - You cannot publish over the previously published versions: 0.1.0.
npm ERR! 403 In most cases, you or one of your dependencies are requesting
npm ERR! 403 a package version that is forbidden by your security policy.
再次发布版本报错,在package.json里面手动改版本