Code Monkey home page Code Monkey logo

Comments (4)

Rich-Harris avatar Rich-Harris commented on May 23, 2024

this was implemented a while back

from svelte.

quantuminformation avatar quantuminformation commented on May 23, 2024

Is there any advantage leaving the rollup config as the default format: 'iife',
vs format: 'esm'.

I found the latter easier to read, but it omits the 'use strict';

It was asked in the comment in this video: https://www.youtube.com/watch?v=1LXEN0Pw6y0&t=5s

Might be better to turn off 'iife' format in rollup, it adds boilerplate you don't need in your output.  Try format: 'esm'


from svelte.

Conduitry avatar Conduitry commented on May 23, 2024

format: 'esm' should only be used if you intend to load the code via <script type='module'>. Otherwise, the code will be run not in strict mode, and top-level identifiers will pollute the global scope. Also, unless you changed your js minifier configuration, top-level identifiers will not get mangled.

from svelte.

quantuminformation avatar quantuminformation commented on May 23, 2024

Thx, esm produced runtime errors.

from svelte.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.