mirror of
https://github.com/troisjs/trois.git
synced 2024-11-24 04:12:02 +08:00
0.1.2 (test ssr vitepress)
This commit is contained in:
parent
b01b251577
commit
a620b7cd32
59190
build/trois.js
Normal file
59190
build/trois.js
Normal file
File diff suppressed because one or more lines are too long
1
build/trois.js.map
Normal file
1
build/trois.js.map
Normal file
File diff suppressed because one or more lines are too long
2
build/trois.min.js
vendored
Normal file
2
build/trois.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
build/trois.min.js.map
Normal file
1
build/trois.min.js.map
Normal file
File diff suppressed because one or more lines are too long
3593
build/trois.module.cdn.js
Normal file
3593
build/trois.module.cdn.js
Normal file
File diff suppressed because it is too large
Load Diff
1
build/trois.module.cdn.js.map
Normal file
1
build/trois.module.cdn.js.map
Normal file
File diff suppressed because one or more lines are too long
2
build/trois.module.cdn.min.js
vendored
Normal file
2
build/trois.module.cdn.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
build/trois.module.cdn.min.js.map
Normal file
1
build/trois.module.cdn.min.js.map
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
2
build/trois.module.min.js
vendored
2
build/trois.module.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "troisjs",
|
"name": "troisjs",
|
||||||
"version": "0.1.1",
|
"version": "0.1.2",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
@ -13,6 +13,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@rollup/plugin-buble": "^0.21.3",
|
"@rollup/plugin-buble": "^0.21.3",
|
||||||
|
"@rollup/plugin-node-resolve": "^11.2.0",
|
||||||
"@rollup/plugin-replace": "^2.3.3",
|
"@rollup/plugin-replace": "^2.3.3",
|
||||||
"@vitejs/plugin-vue": "^1.1.4",
|
"@vitejs/plugin-vue": "^1.1.4",
|
||||||
"@vue/compiler-sfc": "^3.0.5",
|
"@vue/compiler-sfc": "^3.0.5",
|
||||||
@ -24,8 +25,8 @@
|
|||||||
"eslint-plugin-promise": "^4.2.1",
|
"eslint-plugin-promise": "^4.2.1",
|
||||||
"eslint-plugin-standard": "^4.0.1",
|
"eslint-plugin-standard": "^4.0.1",
|
||||||
"eslint-plugin-vue": "^6.2.2",
|
"eslint-plugin-vue": "^6.2.2",
|
||||||
"rollup-plugin-vue": "^6.0.0-beta.10",
|
|
||||||
"rollup-plugin-terser": "^7.0.2",
|
"rollup-plugin-terser": "^7.0.2",
|
||||||
|
"rollup-plugin-vue": "^6.0.0-beta.10",
|
||||||
"sass": "^1.26.10",
|
"sass": "^1.26.10",
|
||||||
"vite": "^2.0.1"
|
"vite": "^2.0.1"
|
||||||
},
|
},
|
||||||
|
142
rollup.config.js
142
rollup.config.js
@ -2,7 +2,8 @@
|
|||||||
import vue from 'rollup-plugin-vue';
|
import vue from 'rollup-plugin-vue';
|
||||||
import buble from '@rollup/plugin-buble';
|
import buble from '@rollup/plugin-buble';
|
||||||
import { terser } from "rollup-plugin-terser";
|
import { terser } from "rollup-plugin-terser";
|
||||||
// import replace from '@rollup/plugin-replace';
|
import replace from '@rollup/plugin-replace';
|
||||||
|
import resolve from '@rollup/plugin-node-resolve';
|
||||||
|
|
||||||
const input = 'src/export.js';
|
const input = 'src/export.js';
|
||||||
const external = [
|
const external = [
|
||||||
@ -25,11 +26,18 @@ const external = [
|
|||||||
'vue',
|
'vue',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const cdn_replaces = {
|
||||||
|
'from \'vue\'': 'from \'https://unpkg.com/vue@3.0.5/dist/vue.esm-browser.prod.js\'',
|
||||||
|
'from \'three\'': 'from \'https://unpkg.com/three@0.125.2/build/three.module.js\'',
|
||||||
|
'from \'three/examples': 'from \'https://unpkg.com/three@0.125.2/examples',
|
||||||
|
'from \'gsap\'': 'from \'https://unpkg.com/gsap@3.5.1/index.js\'',
|
||||||
|
delimiters: ['', ''],
|
||||||
|
};
|
||||||
|
|
||||||
const plugins = [
|
const plugins = [
|
||||||
// commonjs(),
|
|
||||||
vue(),
|
vue(),
|
||||||
buble({
|
buble({
|
||||||
// transforms: { forOf: false },
|
transforms: { asyncAwait: false, forOf: false },
|
||||||
objectAssign: 'Object.assign',
|
objectAssign: 'Object.assign',
|
||||||
}),
|
}),
|
||||||
];
|
];
|
||||||
@ -64,45 +72,35 @@ export default [
|
|||||||
// terser(),
|
// terser(),
|
||||||
// ],
|
// ],
|
||||||
// },
|
// },
|
||||||
// {
|
{
|
||||||
// input,
|
input,
|
||||||
// external,
|
external,
|
||||||
// output: {
|
output: {
|
||||||
// format: 'es',
|
format: 'es',
|
||||||
// exports: 'named',
|
exports: 'named',
|
||||||
// file: 'build/trois.module.cdn.js',
|
file: 'build/trois.module.cdn.js',
|
||||||
// sourcemap: true,
|
sourcemap: true,
|
||||||
// },
|
},
|
||||||
// plugins: [
|
plugins: [
|
||||||
// replace({
|
replace(cdn_replaces),
|
||||||
// 'from \'three\'': 'from \'https://unpkg.com/three@0.120.1/build/three.module.js\'',
|
...plugins,
|
||||||
// 'from \'three/examples': 'from \'https://unpkg.com/three@0.120.1/examples',
|
],
|
||||||
// 'from \'gsap\'': 'from \'https://unpkg.com/gsap@3.5.1/index.js\'',
|
},
|
||||||
// delimiters: ['', ''],
|
{
|
||||||
// }),
|
input,
|
||||||
// ...plugins,
|
external,
|
||||||
// ],
|
output: {
|
||||||
// },
|
format: 'es',
|
||||||
// {
|
exports: 'named',
|
||||||
// input,
|
file: 'build/trois.module.cdn.min.js',
|
||||||
// external,
|
sourcemap: true,
|
||||||
// output: {
|
},
|
||||||
// format: 'es',
|
plugins: [
|
||||||
// exports: 'named',
|
replace(cdn_replaces),
|
||||||
// file: 'build/trois.module.cdn.min.js',
|
...plugins,
|
||||||
// sourcemap: true,
|
terser(),
|
||||||
// },
|
],
|
||||||
// plugins: [
|
},
|
||||||
// replace({
|
|
||||||
// 'from \'three\'': 'from \'https://unpkg.com/three@0.120.1/build/three.module.js\'',
|
|
||||||
// 'from \'three/examples': 'from \'https://unpkg.com/three@0.120.1/examples',
|
|
||||||
// 'from \'gsap\'': 'from \'https://unpkg.com/gsap@3.5.1/index.js\'',
|
|
||||||
// delimiters: ['', ''],
|
|
||||||
// }),
|
|
||||||
// ...plugins,
|
|
||||||
// terser(),
|
|
||||||
// ],
|
|
||||||
// },
|
|
||||||
{
|
{
|
||||||
input,
|
input,
|
||||||
external,
|
external,
|
||||||
@ -128,27 +126,41 @@ export default [
|
|||||||
terser(),
|
terser(),
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
// {
|
{
|
||||||
// input,
|
input,
|
||||||
// external,
|
external: [
|
||||||
// output: {
|
'gsap',
|
||||||
// format: 'cjs',
|
'vue',
|
||||||
// file: 'build/trois.js',
|
],
|
||||||
// sourcemap: true,
|
output: {
|
||||||
// },
|
format: 'cjs',
|
||||||
// plugins,
|
file: 'build/trois.js',
|
||||||
// },
|
sourcemap: true,
|
||||||
// {
|
},
|
||||||
// input,
|
plugins: [
|
||||||
// external,
|
...plugins,
|
||||||
// output: {
|
resolve({
|
||||||
// format: 'cjs',
|
moduleDirectories: ['node_modules'],
|
||||||
// file: 'build/trois.min.js',
|
}),
|
||||||
// sourcemap: true,
|
],
|
||||||
// },
|
},
|
||||||
// plugins: [
|
{
|
||||||
// ...plugins,
|
input,
|
||||||
// terser(),
|
external: [
|
||||||
// ],
|
'gsap',
|
||||||
// },
|
'vue',
|
||||||
|
],
|
||||||
|
output: {
|
||||||
|
format: 'cjs',
|
||||||
|
file: 'build/trois.min.js',
|
||||||
|
sourcemap: true,
|
||||||
|
},
|
||||||
|
plugins: [
|
||||||
|
...plugins,
|
||||||
|
resolve({
|
||||||
|
moduleDirectories: ['node_modules'],
|
||||||
|
}),
|
||||||
|
terser(),
|
||||||
|
],
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
Loading…
Reference in New Issue
Block a user