-
Notifications
You must be signed in to change notification settings - Fork 379
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add bundled example app for Vue Vanilla
* Add rollup config to bundle the Vue Vanilla example * Add to examples app Part of #1706
- Loading branch information
1 parent
8280881
commit acefc00
Showing
5 changed files
with
73 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<!doctype html> | ||
<html> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<title>JSON Forms Vue Vanilla RendererSet</title> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<link rel="stylesheet" href="bundle.css"> | ||
</head> | ||
|
||
<body> | ||
<div id="app"></div> | ||
</body> | ||
<script src="bundle.js"></script> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import commonjs from '@rollup/plugin-commonjs'; | ||
import json from '@rollup/plugin-json'; | ||
import nodeResolve from '@rollup/plugin-node-resolve'; | ||
import replace from '@rollup/plugin-replace'; | ||
import copy from 'rollup-plugin-copy'; | ||
import css from 'rollup-plugin-import-css'; | ||
import typescript from 'rollup-plugin-typescript2'; | ||
import vue from 'rollup-plugin-vue'; | ||
|
||
/** | ||
* @type {import('rollup').RollupOptions} | ||
*/ | ||
const config = { | ||
input: 'dev/serve.ts', | ||
output: { | ||
file: 'example/dist/bundle.js', | ||
format: 'iife', | ||
sourcemap: true | ||
}, | ||
plugins: [ | ||
replace({ | ||
'process.env.NODE_ENV': JSON.stringify('production'), | ||
preventAssignment: true, // recommended to be set by library to be forward compatible | ||
}), | ||
vue(), | ||
nodeResolve({ browser: true }), | ||
// Transform mixed because some JsonForms modules use import and require | ||
commonjs({ transformMixedEsModules: true }), | ||
css(), | ||
json(), | ||
typescript({ | ||
tsconfigOverride: { | ||
include: null, | ||
compilerOptions: { | ||
// Do not emit typescript declarations for our bundled example app | ||
declaration: false | ||
} | ||
} | ||
}), | ||
copy({ | ||
targets: [ | ||
{ | ||
src: 'example/index.bundled.html', | ||
dest: 'example/dist', | ||
rename: () => 'index.html' | ||
}, | ||
] | ||
}), | ||
] | ||
} | ||
|
||
export default config; |