-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathrollup.config.js
42 lines (38 loc) · 1009 Bytes
/
rollup.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import vue from 'rollup-plugin-vue'
import cleanup from 'rollup-plugin-cleanup'
import scss from 'rollup-plugin-scss'
import rootImport from 'rollup-plugin-root-import';
import babel from 'rollup-plugin-babel';
export default {
input: './app/main.js',
output: {
file: './tns/app/app.js',
format: 'cjs',
},
name: 'NativeScript-Vue-App',
sourceMap: false,
plugins: [
rootImport({
// Will first look in `client/src/*` and then `common/src/*`.
root: `${__dirname}/app`,
useEntry: 'prepend',
// If we don't find the file verbatim, try adding these extensions
extensions: ['.js', '.vue', '.css', '.scss']
}),
vue({
autoStyles: false,
styleToImports: true,
compileTemplate: false
}),
scss({ output: './tns/app/app.css' }),
babel({
exclude: 'node_modules/**'
}),
cleanup({
extensions: ['.js', '.css']
})
],
external(id) {
return id.startsWith('ui/') || id.startsWith('application')
},
};