js:add es5 compile option

This commit is contained in:
pengfei.zhou
2020-01-17 10:12:13 +08:00
committed by osborn
parent 7f089b6bcd
commit 83a9b79073
15 changed files with 881 additions and 16519 deletions

View File

@@ -18,25 +18,6 @@ export default [
console.warn(warning.message);
}
},
{
input: "lib-es5/index.runtime.es5.js",
output: {
name: "doric",
format: "iife",
file: "bundle/doric-sandbox.es5.js",
},
plugins: [
resolve({ mainFields: ["jsnext"] }),
commonjs(),
buble({
transforms: { dangerousForOf: true }
}),
],
onwarn: function (warning) {
if (warning.code === 'THIS_IS_UNDEFINED') { return; }
console.warn(warning.message);
}
},
{
input: "lib/index.js",
output: {
@@ -52,24 +33,6 @@ export default [
console.warn(warning.message);
}
},
{
input: "lib-es5/index.js",
output: {
format: "cjs",
file: "bundle/doric-lib.es5.js",
},
plugins: [
resolve({ mainFields: ["jsnext"] }),
buble({
transforms: { dangerousForOf: true }
}),
],
external: ['reflect-metadata'],
onwarn: function (warning) {
if (warning.code === 'THIS_IS_UNDEFINED') { return; }
console.warn(warning.message);
}
},
{
input: "lib/index.debug.js",
output: {
@@ -85,4 +48,42 @@ export default [
console.warn(warning.message);
}
},
// {
// input: "lib-es5/index.runtime.es5.js",
// output: {
// name: "doric",
// format: "iife",
// file: "bundle/doric-sandbox.es5.js",
// },
// plugins: [
// resolve({ mainFields: ["jsnext"] }),
// commonjs(),
// buble({
// transforms: { dangerousForOf: true }
// }),
// ],
// onwarn: function (warning) {
// if (warning.code === 'THIS_IS_UNDEFINED') { return; }
// console.warn(warning.message);
// }
// },
// {
// input: "lib-es5/index.es5.js",
// output: {
// format: "cjs",
// file: "bundle/doric-lib.es5.js",
// },
// plugins: [
// resolve({ mainFields: ["jsnext"] }),
// buble({
// transforms: { dangerousForOf: true }
// }),
// ],
// external: ['reflect-metadata'],
// onwarn: function (warning) {
// if (warning.code === 'THIS_IS_UNDEFINED') { return; }
// console.warn(warning.message);
// }
// },
]