1 Star 0 Fork 0

gao / lowCodeComponentPlugin

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
vue.config.js 948 Bytes
一键复制 编辑 原始数据 按行查看 历史
gao 提交于 2024-05-09 10:44 . 添加css样式打入js的配置
const { defineConfig } = require('@vue/cli-service')
const NodePolyfillPlugin = require('node-polyfill-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin')
module.exports = defineConfig({
css: {
extract: false, // 关闭 CSS 提取,以便样式可以注入到 lib 中
},
transpileDependencies: true,
configureWebpack: {
plugins: [
new NodePolyfillPlugin()
],
output: {
filename: '[name].js',
libraryTarget: 'umd'
}
},
chainWebpack: config => {
config.module
.rule('js')
.test(/\.js$/)
.use('babel-loader')
.loader('babel-loader')
.end();
if (process.env.NODE_ENV === "production"){
config.plugin("copy").use(CopyWebpackPlugin, [{patterns: [
{ from: "src/**/*"},
{ from: "package/**/*"},
// { from: "lib" },
{ from: "package.json" },
{ from: "manifest.json" }
]}]);
}
}
})
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/gao1998/low-code-component-plugin.git
git@gitee.com:gao1998/low-code-component-plugin.git
gao1998
low-code-component-plugin
lowCodeComponentPlugin
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891