Open panManfredini opened 4 years ago
Rollup config that works for me:
// rollup.config.js
import typescript from 'rollup-plugin-typescript2';
import { nodeResolve } from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import json from '@rollup/plugin-json';
export default {
input: [
"./main.ts"
],
plugins: [
nodeResolve( {browser:true}),
typescript(
{
allowjs: true,
"allowSyntheticDefaultImports" : true,
"experimentalDecorators": true,
"module": "es6",
"moduleResolution":"Node",
"target": "es2018",
"noImplicitAny": true,
}
),
commonjs(),
json(),
],
output:{
dir : 'dist/js/',
format : 'es'
}
}
basically same issue as #1.
I realize that webpack + tsloader does not compile at all. The
customelements.define
function fails.Webpack standalone works (so compiling first with tsc). Rollup+rollup-plugin-typescript2 works.
Quick solution