mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-11-30 18:27:40 +08:00
fix(build): esbuild transform vue sfc (#5602)
This commit is contained in:
parent
fec3d0c69d
commit
3c16321110
@ -21,6 +21,7 @@ import {
|
||||
import { withTaskName } from './utils/gulp'
|
||||
import { EP_BRAND_NAME } from './utils/constants'
|
||||
import { target } from './build-info'
|
||||
import type { Plugin } from 'rollup'
|
||||
|
||||
const banner = `/*! ${EP_BRAND_NAME} v${version} */\n`
|
||||
|
||||
@ -31,7 +32,7 @@ async function buildFullEntry(minify: boolean) {
|
||||
ElementPlusAlias(),
|
||||
vue({
|
||||
isProduction: true,
|
||||
}),
|
||||
}) as Plugin,
|
||||
nodeResolve({
|
||||
extensions: ['.mjs', '.js', '.json', '.ts'],
|
||||
}),
|
||||
@ -40,6 +41,9 @@ async function buildFullEntry(minify: boolean) {
|
||||
minify,
|
||||
sourceMap: minify,
|
||||
target,
|
||||
loaders: {
|
||||
'.vue': 'ts',
|
||||
},
|
||||
}),
|
||||
replace({
|
||||
'process.env.NODE_ENV': JSON.stringify('production'),
|
||||
|
@ -37,6 +37,9 @@ export const buildModules = async () => {
|
||||
esbuild({
|
||||
sourceMap: true,
|
||||
target,
|
||||
loaders: {
|
||||
'.vue': 'ts',
|
||||
},
|
||||
}),
|
||||
filesize({ reporter }),
|
||||
],
|
||||
|
Loading…
Reference in New Issue
Block a user