How to import p5 library in es6

Environment
node.js
parcel

problem description

P5 has been downloaded to node_modules
how to import P5 in js files and use it

question 1:
the methods currently used are as follows

import p5 from "p5";

p5.setup = () =>{

}
p5.draw = () =>{
    ellipse(50, 50, 80, 80);
}

in this way, the program does not export
when parcel is packaged, but it still doesn"t show up when you start the server

.

question 2:
the above is to introduce the whole package of p5 to
how to implement
if only the p5.min.js in this package of data is introduced.

import p5 from "./p5.min.js";

these sub-parcel will show error message when packing

 C:\Users\user\Dropbox\p5\p5_one\src\script.js:3:15: Cannot resolve dependency "./p5.min.js" at "C:\Users\user\Dropbox\p5\p5_one\src\p5.min.js"





import * as p5 from 'p5';
let s = (sk) => {    
    sk.setup = () =>{
        sk.createCanvas(window.innerWidth,window.innerHeight);
    }

    sk.draw = () =>{

    }
}
const P5 = new p5(s);

do this;)


that depends on whether the js p5.min.js supports es6 module syntax

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e4615b-44312.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e4615b-44312.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?