• I'm trying to use the new rollup-plugin-espruino-modules (the old one is not API compatible with Rollup anymore).

    import { espruinoModules } from 'rollup-plugin-espruino-modules'
    import commonjs from 'rollup-plugin-commonjs'
    import { terser as terserPlugin } from "rollup-plugin-terser";
    
    export default {
      input: 'src/main.js',
      output: {
        file: 'dist/bundle.js',
        format: 'es'
      },
      plugins: [
        commonjs(),
        terserPlugin({
          compress: true,
          mangle: true
        }),
        espruinoModules({
          board: 'ESP8266_4MB'
        }),
      ],
    }
    

    Running rollup fails with this:

    Error: ENOENT: no such file or directory, open 'C:\dev-esp\espruino-cc1101-q7rf\modules\.board_ESP8266_4MB.json'
    

    Mod: okay, never mind, I've figured out. I needed to create the modules directory by hand, otherwise it fails. It's probably a bug.

    Am I correct that this new module cannot upload the code to the board after bundling? I've seen the older plugin had the port/baud/save options for this, but not this.

    Also is it okay to run the Espruino plugin after the Terser like this?

About

Avatar for nistvan.86 @nistvan.86 started