Please specify what version of the library you are using......: [ 3.11.0 ]
Please specify what version(s) of PowerPoint you are targeting: [ any ]
Please specify what web browser you are using.................: [ any modern ]
Desired Behavior
That I am able to dynamically and normal import this app without errors in es6
Observed Behavior
With this:
const a = await import('pptxgenjs');
// or
const a = await import('pptxgenjs/dist/pptxgen.es.js');
// or
import a from 'pptxgenjs';
// or
import a from 'pptxgenjs/dist/pptxgen.es.js';
I get:
Uncaught (in promise) TypeError: The specifier “stream” was a bare
specifier, but was not remapped to anything. Relative module specifiers
must start with “./”, “../” or “/”.
Steps to Reproduce
Use this rollup config:
rollup.config.js
```
import { nodeResolve } from '@rollup/plugin-node-resolve';
import json from '@rollup/plugin-json';
import styles from 'rollup-plugin-styles';
import { terser } from 'rollup-plugin-terser';
import svg from 'rollup-plugin-svg-import';
import commonjs from '@rollup/plugin-commonjs';
// import { generateImageSizes } from 'rollup-plugin-generate-image-sizes';
export default [
{
input: ['src/dtm.js'],
external: (id) => {
if (id.includes('history')) return true;
return false;
},
output: {
name: 'dtm',
format: 'es',
sourcemap: true,
exports: 'named',
dir: './dist',
assetFileNames: '[name][extname]'
},
plugins: [
nodeResolve({ preferBuiltins: true }),
commonjs(),
// generateImageSizes({
// dir: 'assets/images',
// maxParallel: 1
// }),
svg({
// process SVG to DOM Node or String. Default: false
stringify: true
}),
styles({
mode: 'extract',
url: false
}),
json(),
terser()
]
}
];
```
And then this code:
const a = await import('pptxgenjs');
// or
const a = await import('pptxgenjs/dist/pptxgen.es.js');
// or
import a from 'pptxgenjs';
// or
import a from 'pptxgenjs/dist/pptxgen.es.js';
Issue Category
Product Versions
Desired Behavior
That I am able to dynamically and normal import this app without errors in es6
Observed Behavior
With this:
I get:
Steps to Reproduce
Use this rollup config:
rollup.config.js
``` import { nodeResolve } from '@rollup/plugin-node-resolve'; import json from '@rollup/plugin-json'; import styles from 'rollup-plugin-styles'; import { terser } from 'rollup-plugin-terser'; import svg from 'rollup-plugin-svg-import'; import commonjs from '@rollup/plugin-commonjs'; // import { generateImageSizes } from 'rollup-plugin-generate-image-sizes'; export default [ { input: ['src/dtm.js'], external: (id) => { if (id.includes('history')) return true; return false; }, output: { name: 'dtm', format: 'es', sourcemap: true, exports: 'named', dir: './dist', assetFileNames: '[name][extname]' }, plugins: [ nodeResolve({ preferBuiltins: true }), commonjs(), // generateImageSizes({ // dir: 'assets/images', // maxParallel: 1 // }), svg({ // process SVG to DOM Node or String. Default: false stringify: true }), styles({ mode: 'extract', url: false }), json(), terser() ] } ]; ```And then this code: