Compare commits
12 Commits
Author | SHA1 | Date | |
---|---|---|---|
00ab4d3610 | |||
0adb181bbf | |||
053ef1f770 | |||
d35f32d68f | |||
fb6207d963 | |||
e6c2288c24 | |||
b925fffc58 | |||
5289d2af92 | |||
b7d1321f3f | |||
3d32d703bf | |||
f2c02e6afc | |||
1a4ff7811c |
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@gitzone/tsbundle",
|
"name": "@gitzone/tsbundle",
|
||||||
"version": "1.0.7",
|
"version": "1.0.13",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@gitzone/tsbundle",
|
"name": "@gitzone/tsbundle",
|
||||||
"version": "1.0.7",
|
"version": "1.0.13",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "a bundler using rollup for painless bundling of web projects",
|
"description": "a bundler using rollup for painless bundling of web projects",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
@ -4,14 +4,17 @@ import sourceMaps from 'rollup-plugin-sourcemaps';
|
|||||||
import typescript from 'rollup-plugin-typescript2';
|
import typescript from 'rollup-plugin-typescript2';
|
||||||
import json from 'rollup-plugin-json';
|
import json from 'rollup-plugin-json';
|
||||||
import babel from 'rollup-plugin-babel';
|
import babel from 'rollup-plugin-babel';
|
||||||
|
import nodeResolve from 'rollup-plugin-node-resolve';
|
||||||
|
|
||||||
const pkg = require('./package.json');
|
const pkg = require('./package.json');
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
input: `ts_web/index.ts`,
|
input: `ts_web/index.ts`,
|
||||||
output: {
|
output: {
|
||||||
file: 'dist/bundle.js',
|
name: 'tsbundle',
|
||||||
format: 'es',
|
// file: 'dist_web/bundle.js',
|
||||||
|
file: 'dist_web/bundle.js',
|
||||||
|
format: 'iife',
|
||||||
sourcemap: true
|
sourcemap: true
|
||||||
},
|
},
|
||||||
// Indicate here external modules you don't wanna include in your bundle (i.e.: 'lodash')
|
// Indicate here external modules you don't wanna include in your bundle (i.e.: 'lodash')
|
||||||
@ -23,9 +26,24 @@ export default {
|
|||||||
// Allow json resolution
|
// Allow json resolution
|
||||||
json(),
|
json(),
|
||||||
// Compile TypeScript files
|
// Compile TypeScript files
|
||||||
typescript({ useTsconfigDeclarationDir: true }),
|
typescript({ useTsconfigDeclarationDir: true, tsconfigOverride: {
|
||||||
|
compilerOptions: {
|
||||||
|
declaration: true,
|
||||||
|
emitDecoratorMetadata: true,
|
||||||
|
experimentalDecorators: true,
|
||||||
|
inlineSourceMap: true,
|
||||||
|
noEmitOnError: true,
|
||||||
|
lib: ['es2016', 'es2017', 'dom'],
|
||||||
|
noImplicitAny: false
|
||||||
|
}
|
||||||
|
} }),
|
||||||
|
nodeResolve(),
|
||||||
// Allow bundling cjs modules (unlike webpack, rollup doesn't understand cjs)
|
// Allow bundling cjs modules (unlike webpack, rollup doesn't understand cjs)
|
||||||
commonjs(),
|
commonjs({
|
||||||
|
namedExports: {
|
||||||
|
'node_modules/@pushrocks/smartstate/dist/index.js': ['Smartstate']
|
||||||
|
}
|
||||||
|
}),
|
||||||
// Allow node_modules resolution, so you can use 'external' to control
|
// Allow node_modules resolution, so you can use 'external' to control
|
||||||
// which external modules to include in the bundle
|
// which external modules to include in the bundle
|
||||||
// https://github.com/rollup/rollup-plugin-node-resolve#usage
|
// https://github.com/rollup/rollup-plugin-node-resolve#usage
|
||||||
@ -33,6 +51,10 @@ export default {
|
|||||||
|
|
||||||
// Resolve source maps to the original source
|
// Resolve source maps to the original source
|
||||||
sourceMaps(),
|
sourceMaps(),
|
||||||
babel()
|
babel({
|
||||||
|
extensions: ['.js', '.jsx', '.ts', '.tsx'],
|
||||||
|
babelrc: false,
|
||||||
|
presets: [["@babel/es2015", { modules: false }]]
|
||||||
|
})
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user