diff --git a/examples/react/.env.development b/examples/react/.env.development
new file mode 100644
index 0000000..7d658e2
--- /dev/null
+++ b/examples/react/.env.development
@@ -0,0 +1,2 @@
+NODE_ENV=development
+ELF_APP__ENV=development
diff --git a/examples/react/.gitignore b/examples/react/.gitignore
new file mode 100644
index 0000000..d30e5e5
--- /dev/null
+++ b/examples/react/.gitignore
@@ -0,0 +1,21 @@
+.DS_Store
+.cache
+node_modules/
+/dist/
+npm-debug.log*
+lerna-debug.log
+yarn-debug.log*
+yarn-error.log*
+report
+coverage
+dist
+lib
+package-lock.json
+
+# Editor directories and files
+.idea
+.vscode
+*.suo
+*.ntvs*
+*.njsproj
+*.sln
diff --git a/examples/react/babel.config.js b/examples/react/babel.config.js
new file mode 100644
index 0000000..e668a05
--- /dev/null
+++ b/examples/react/babel.config.js
@@ -0,0 +1,13 @@
+
+module.exports = {
+ presets: [
+ '@babel/preset-react',
+ [
+ '@babel/env',
+ {
+ useBuiltIns: 'usage',
+ corejs: 2
+ }
+ ]
+ ]
+}
diff --git a/examples/react/package.json b/examples/react/package.json
new file mode 100644
index 0000000..061e3a4
--- /dev/null
+++ b/examples/react/package.json
@@ -0,0 +1,22 @@
+{
+ "name": "rate",
+ "description": "rate component",
+ "files": [
+ "lib",
+ "src"
+ ],
+ "scripts": {
+ "start": "elf-scripts build",
+ "umd": "elf-scripts umd",
+ "iife": "elf-scripts iife",
+ "serve": "elf-scripts serve"
+ },
+ "dependencies": {
+ "core-js": "^2.6.9",
+ "react": "^16.10.2"
+ },
+ "devDependencies": {
+ "@babel/preset-env": "^7.6.2",
+ "@babel/preset-react": "^7.6.3"
+ }
+}
diff --git a/examples/react/src/index.js b/examples/react/src/index.js
new file mode 100644
index 0000000..a3f81d0
--- /dev/null
+++ b/examples/react/src/index.js
@@ -0,0 +1,4 @@
+import Rate from './rate';
+import './style.scss';
+
+export default Rate;
diff --git a/examples/react/src/rate.js b/examples/react/src/rate.js
new file mode 100644
index 0000000..78e7e6d
--- /dev/null
+++ b/examples/react/src/rate.js
@@ -0,0 +1,18 @@
+import { Component } from 'react'
+
+class Rate extends Component {
+ constructor() {
+ super()
+ this.state = {
+ msg: 'hi'
+ }
+ }
+
+ render () {
+ return (
+
{this.state.msg}
+ )
+ }
+}
+
+export default Rate
diff --git a/examples/react/src/style.scss b/examples/react/src/style.scss
new file mode 100644
index 0000000..1e84c56
--- /dev/null
+++ b/examples/react/src/style.scss
@@ -0,0 +1,76 @@
+
+@font-face {
+ font-family: "grate";
+ src: url("data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAAR0AAsAAAAABzAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADMAAABCsP6z7U9TLzIAAAE8AAAARAAAAFY+VUpcY21hcAAAAYAAAABXAAABhnGv1IxnbHlmAAAB2AAAAK8AAAEUwi/5HmhlYWQAAAKIAAAALAAAADYSdy7IaGhlYQAAArQAAAAcAAAAJAfeA4RobXR4AAAC0AAAAAwAAAAMDAAAAGxvY2EAAALcAAAACAAAAAgATgCKbWF4cAAAAuQAAAAeAAAAIAEPADluYW1lAAADBAAAAUUAAAJtPlT+fXBvc3QAAARMAAAAJwAAADo9U12GeJxjYGRgYOBikGPQYWB0cfMJYeBgYGGAAJAMY05meiJQDMoDyrGAaQ4gZoOIAgCKIwNPAHicY2BkYWCcwMDKwMHUyXSGgYGhH0IzvmYwYuRgYGBiYGVmwAoC0lxTGBye33+Rxdzwv4EhhrmBoQEozAiSAwD3jA0veJztkLERgDAMA99OSMExCAUDUTEAS1OSLYLiwBbo7q2z7ErABCSxiQx2YHTtSi3yxBx5jp8iN/y+6tkafC6ZbiXcNQq/lpjru3lva9CbrecAfwDu5xJ2AHicY2BiAALmlcz2DEoMOgwMjPqMaupqbPxMbOxsYvKM7Gzicoz2jOJi5nZAGXMzczM1VnF1dnN1e0Z5Ruaef4WsXDwS7IX/uNm5GDl36DCysknyPH7MxcXHx6izg52Jif/ff5W9e1VmXomLu8Ikr/qMi4WNg+eZKhM7lxTX5r9cXDzsbOXlrIzMorx/N3Nw84qev5ScfGmq/P798iBnMSK5jQiXEeMeYhwBACs6NOIAeJxjYGRgYADii+olZ+L5bb4ycLMwgMD1NaVuyDQLA7M9kOJgYALxABk6CLV4nGNgZGBgbvjfwBDDwgACQJKRARUwAwBHCQJsBAAAAAQAAAAEAAAAAAAAAABOAIp4nGNgZGBgYGbQZWBiAAEQyQWEDAz/wXwGAA0uAUkAAHicZY9NTsMwEIVf+gekEqqoYIfkBWIBKP0Rq25YVGr3XXTfpk6bKokjx63UA3AejsAJOALcgDvwSCebNpbH37x5Y08A3OAHHo7fLfeRPVwyO3INF7gXrlN/EG6QX4SbaONVuEX9TdjHM6bCbXRheYPXuGL2hHdhDx18CNdwjU/hOvUv4Qb5W7iJO/wKt9Dx6sI+5l5XuI1HL/bHVi+cXqnlQcWhySKTOb+CmV7vkoWt0uqca1vEJlODoF9JU51pW91T7NdD5yIVWZOqCas6SYzKrdnq0AUb5/JRrxeJHoQm5Vhj/rbGAo5xBYUlDowxQhhkiMro6DtVZvSvsUPCXntWPc3ndFsU1P9zhQEC9M9cU7qy0nk6T4E9XxtSdXQrbsuelDSRXs1JErJCXta2VELqATZlV44RelzRiT8oZ0j/AAlabsgAAAB4nGNgYoAALgbsgJmRiZGZkYWBpbgksYgTROimZebkMDAAADayBXEA") format("woff"); /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
+}
+
+[class^="g-icon"] {
+
+ display: inline-block;
+ font-family: "grate";
+ font-style: normal;
+ line-height: 1;
+ text-align: center;
+ text-rendering: optimizeLegibility;
+ text-transform: none;
+ vertical-align: baseline;
+ -webkit-font-smoothing: antialiased;
+}
+
+.g-icon-star:before { content: "\e7df"; }
+
+.g-icon-star-fill:before { content: "\e86a"; }
+
+.g-rate {
+ font-size: 0;
+ line-height: 1;
+
+ &.is-disabled {
+ .g-rate-item {
+ cursor: default;
+
+ &:hover {
+ transform: scale(1);
+ }
+ }
+ }
+
+ &-list {
+ display: inline-block;
+ height: 18px;
+ vertical-align: middle;
+ }
+
+ &-item {
+ position: relative;
+ display: inline-block;
+ margin-right: 6px;
+ font-size: 18px;
+ color: #c6d1de;
+ cursor: pointer;
+ transition: .3s;
+
+ &:last-child {
+ margin-right: 0;
+ }
+
+ &:hover {
+ transform: scale(1.15);
+ }
+ }
+
+ .is-half {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 50%;
+ overflow: hidden;
+ }
+
+ &-text {
+ display: inline-block;
+ margin-left: 10px;
+ font-size: 14px;
+ vertical-align: middle;
+ }
+}
diff --git a/examples/react/stats.html b/examples/react/stats.html
new file mode 100644
index 0000000..19e87db
--- /dev/null
+++ b/examples/react/stats.html
@@ -0,0 +1,4318 @@
+
+
+
+
+
+
+ RollUp Visualizer
+
+
+
+
+ RollUp Visualizer
+
+
+
+
+
diff --git a/examples/ts/.env.development b/examples/ts/.env.development
new file mode 100644
index 0000000..7d658e2
--- /dev/null
+++ b/examples/ts/.env.development
@@ -0,0 +1,2 @@
+NODE_ENV=development
+ELF_APP__ENV=development
diff --git a/examples/ts/.gitignore b/examples/ts/.gitignore
new file mode 100644
index 0000000..d30e5e5
--- /dev/null
+++ b/examples/ts/.gitignore
@@ -0,0 +1,21 @@
+.DS_Store
+.cache
+node_modules/
+/dist/
+npm-debug.log*
+lerna-debug.log
+yarn-debug.log*
+yarn-error.log*
+report
+coverage
+dist
+lib
+package-lock.json
+
+# Editor directories and files
+.idea
+.vscode
+*.suo
+*.ntvs*
+*.njsproj
+*.sln
diff --git a/examples/ts/babel.config.js b/examples/ts/babel.config.js
new file mode 100644
index 0000000..3e309ec
--- /dev/null
+++ b/examples/ts/babel.config.js
@@ -0,0 +1,16 @@
+
+module.exports = {
+ plugins: [
+ '@vue/babel-plugin-transform-vue-jsx',
+ ['@babel/plugin-proposal-decorators', { legacy: true }]
+ ],
+ presets: [
+ [
+ '@babel/env',
+ {
+ useBuiltIns: 'usage',
+ corejs: 2
+ }
+ ]
+ ]
+}
diff --git a/examples/ts/elf.config.js b/examples/ts/elf.config.js
new file mode 100644
index 0000000..8ee274a
--- /dev/null
+++ b/examples/ts/elf.config.js
@@ -0,0 +1,7 @@
+module.exports = {
+ pluginOptions: {
+ typescript2: {
+ objectHashIgnoreUnknownHack: true
+ }
+ }
+}
diff --git a/examples/ts/package.json b/examples/ts/package.json
new file mode 100644
index 0000000..2a0dbfa
--- /dev/null
+++ b/examples/ts/package.json
@@ -0,0 +1,25 @@
+{
+ "name": "rate",
+ "description": "rate component",
+ "files": [
+ "lib",
+ "src"
+ ],
+ "scripts": {
+ "start": "elf-scripts build",
+ "umd": "elf-scripts umd",
+ "iife": "elf-scripts iife",
+ "serve": "elf-scripts serve"
+ },
+ "dependencies": {
+ "@babel/plugin-proposal-decorators": "^7.6.0",
+ "@vue/babel-helper-vue-jsx-merge-props": "^1.0.0",
+ "core-js": "^2.6.9",
+ "vue": "^2.5.17",
+ "vue-class-component": "^7.1.0"
+ },
+ "devDependencies": {
+ "@babel/preset-env": "^7.6.2",
+ "@vue/babel-plugin-transform-vue-jsx": "^1.0.0"
+ }
+}
diff --git a/examples/ts/src/index.js b/examples/ts/src/index.js
new file mode 100644
index 0000000..a3f81d0
--- /dev/null
+++ b/examples/ts/src/index.js
@@ -0,0 +1,4 @@
+import Rate from './rate';
+import './style.scss';
+
+export default Rate;
diff --git a/examples/ts/src/rate.vue b/examples/ts/src/rate.vue
new file mode 100644
index 0000000..7d46c47
--- /dev/null
+++ b/examples/ts/src/rate.vue
@@ -0,0 +1,45 @@
+
+
+
+
prop: {{propMessage}}
+
msg: {{msg}}
+
helloMsg: {{helloMsg}}
+
computed msg: {{computedMsg}}
+
+
+
+
+
diff --git a/examples/ts/src/style.scss b/examples/ts/src/style.scss
new file mode 100644
index 0000000..1e84c56
--- /dev/null
+++ b/examples/ts/src/style.scss
@@ -0,0 +1,76 @@
+
+@font-face {
+ font-family: "grate";
+ src: url("data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAAR0AAsAAAAABzAAA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5Y08A3OAHHo7fLfeRPVwyO3INF7gXrlN/EG6QX4SbaONVuEX9TdjHM6bCbXRheYPXuGL2hHdhDx18CNdwjU/hOvUv4Qb5W7iJO/wKt9Dx6sI+5l5XuI1HL/bHVi+cXqnlQcWhySKTOb+CmV7vkoWt0uqca1vEJlODoF9JU51pW91T7NdD5yIVWZOqCas6SYzKrdnq0AUb5/JRrxeJHoQm5Vhj/rbGAo5xBYUlDowxQhhkiMro6DtVZvSvsUPCXntWPc3ndFsU1P9zhQEC9M9cU7qy0nk6T4E9XxtSdXQrbsuelDSRXs1JErJCXta2VELqATZlV44RelzRiT8oZ0j/AAlabsgAAAB4nGNgYoAALgbsgJmRiZGZkYWBpbgksYgTROimZebkMDAAADayBXEA") format("woff"); /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
+}
+
+[class^="g-icon"] {
+
+ display: inline-block;
+ font-family: "grate";
+ font-style: normal;
+ line-height: 1;
+ text-align: center;
+ text-rendering: optimizeLegibility;
+ text-transform: none;
+ vertical-align: baseline;
+ -webkit-font-smoothing: antialiased;
+}
+
+.g-icon-star:before { content: "\e7df"; }
+
+.g-icon-star-fill:before { content: "\e86a"; }
+
+.g-rate {
+ font-size: 0;
+ line-height: 1;
+
+ &.is-disabled {
+ .g-rate-item {
+ cursor: default;
+
+ &:hover {
+ transform: scale(1);
+ }
+ }
+ }
+
+ &-list {
+ display: inline-block;
+ height: 18px;
+ vertical-align: middle;
+ }
+
+ &-item {
+ position: relative;
+ display: inline-block;
+ margin-right: 6px;
+ font-size: 18px;
+ color: #c6d1de;
+ cursor: pointer;
+ transition: .3s;
+
+ &:last-child {
+ margin-right: 0;
+ }
+
+ &:hover {
+ transform: scale(1.15);
+ }
+ }
+
+ .is-half {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 50%;
+ overflow: hidden;
+ }
+
+ &-text {
+ display: inline-block;
+ margin-left: 10px;
+ font-size: 14px;
+ vertical-align: middle;
+ }
+}
diff --git a/examples/ts/stats.html b/examples/ts/stats.html
new file mode 100644
index 0000000..0c7b3dd
--- /dev/null
+++ b/examples/ts/stats.html
@@ -0,0 +1,4318 @@
+
+
+
+
+
+
+ RollUp Visualizer
+
+
+
+
+ RollUp Visualizer
+
+
+
+
+
diff --git a/examples/ts/tsconfig.json b/examples/ts/tsconfig.json
new file mode 100644
index 0000000..f7deeb2
--- /dev/null
+++ b/examples/ts/tsconfig.json
@@ -0,0 +1,15 @@
+{
+ "compilerOptions": {
+ "outDir": "./dist",
+ "sourceMap": true,
+ "target": "es5",
+ "lib": ["es2017", "dom"],
+ "moduleResolution": "node",
+ "declaration": true,
+ "declarationDir": "typings",
+ "experimentalDecorators": true
+ },
+ "files": [
+ "src/index.js"
+ ]
+}
diff --git a/examples/ts/typings/rate.vue.d.ts b/examples/ts/typings/rate.vue.d.ts
new file mode 100644
index 0000000..b41c6a8
--- /dev/null
+++ b/examples/ts/typings/rate.vue.d.ts
@@ -0,0 +1,12 @@
+import Vue from 'vue';
+declare const AppProps: import("vue").VueConstructor<{
+ propMessage: string;
+} & Vue>;
+export default class App extends AppProps {
+ msg: string;
+ helloMsg: string;
+ mounted(): void;
+ readonly computedMsg: string;
+ greet(): void;
+}
+export {};
diff --git a/examples/vue/src/vue/vue.vue b/examples/vue/src/vue/vue.vue
new file mode 100644
index 0000000..d1a407e
--- /dev/null
+++ b/examples/vue/src/vue/vue.vue
@@ -0,0 +1,75 @@
+
diff --git a/lib/config/config.default.js b/lib/config/config.default.js
index e1f3e6a..e13c0a3 100644
--- a/lib/config/config.default.js
+++ b/lib/config/config.default.js
@@ -6,7 +6,7 @@ module.exports = {
modes: 'esm',
lintOnSave: false,
configureRollup: null,
- modules: [],
+ modules: undefined,
pluginOptions: {
replace: {},
alias: {