Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

if entry point is named '.mjs' it does not works #8

Closed
muayyad-alsadi opened this issue Jun 4, 2020 · 2 comments
Closed

if entry point is named '.mjs' it does not works #8

muayyad-alsadi opened this issue Jun 4, 2020 · 2 comments

Comments

@muayyad-alsadi
Copy link

hi,

if I have src/index.js it works
if I renamed it to src/index.mjs it does not.

that is bad because rollup is about .mjs (EcmaScript modules).

@aMarCruz
Copy link
Owner

@muayyad-alsadi , you can use the extensions option:

import { rollup } from 'rollup'
import jscc from 'rollup-plugin-jscc'

export default {
  input: 'src/main.js',
  plugins: [
    jscc({
      extensions: ['js', 'mjs', 'pug', 'html'],    // etc
      values: { _APPNAME: 'My App', _DEBUG: 1 },
    }),
  ],
  //...other options
}

I will include 'mjs' in the next version

@aMarCruz
Copy link
Owner

aMarCruz commented Sep 3, 2020

@muayyad-alsadi ,
rollup-plugin-jscc v2.0 is in npm, it includes "mjs" in the default extension list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants