mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-03-19 14:00:50 +08:00
build: babel output for package building
This commit is contained in:
parent
4448456056
commit
024dd95ca5
@ -1,10 +1,11 @@
|
||||
// the file is used for jest testing & site building
|
||||
// > 2%, make template string not compiled to concat, since it's not fast
|
||||
module.exports = {
|
||||
presets: [
|
||||
[
|
||||
'@babel/preset-env',
|
||||
{
|
||||
targets: 'defaults, not IE 11'
|
||||
targets: '>2%, not IE 11'
|
||||
}
|
||||
]
|
||||
]
|
||||
|
@ -58,7 +58,7 @@
|
||||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/preset-env": "^7.12.7",
|
||||
"@babel/preset-env": "^7.12.10",
|
||||
"@rollup/plugin-babel": "^5.2.2",
|
||||
"@rollup/plugin-node-resolve": "^10.0.0",
|
||||
"@rollup/plugin-replace": "^2.3.4",
|
||||
|
@ -2,9 +2,10 @@ const cssRenderPlugin = require('./build/rollup-plugin-css-render')
|
||||
const { nodeResolve } = require('@rollup/plugin-node-resolve')
|
||||
const { terser } = require('rollup-plugin-terser')
|
||||
const replace = require('@rollup/plugin-replace')
|
||||
const { babel } = require('@rollup/plugin-babel')
|
||||
|
||||
function externalValidator (patterns) {
|
||||
return id => patterns.some(pattern => id.startsWith(pattern))
|
||||
return (id) => patterns.some((pattern) => id.startsWith(pattern))
|
||||
}
|
||||
|
||||
// do not use babel when build library, use it when only build the site
|
||||
@ -31,6 +32,9 @@ module.exports = {
|
||||
extensions: ['.js', '.json']
|
||||
}),
|
||||
cssRenderPlugin(),
|
||||
babel({
|
||||
babelHelpers: 'bundled'
|
||||
}),
|
||||
terser({
|
||||
mangle: false,
|
||||
output: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user