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

Make it works with .mjs files #1126

Closed
levvsha opened this issue Dec 18, 2018 · 9 comments
Closed

Make it works with .mjs files #1126

levvsha opened this issue Dec 18, 2018 · 9 comments

Comments

@levvsha
Copy link

levvsha commented Dec 18, 2018

Great approach with compiling of mjs files for modern browsers is described in this article. I faced with a problem when I specify output.filename in a webpack configuration file as a file with .mjs extension:

output: {
  filename: 'main.mjs',
  path: path.resolve(__dirname, 'public'),
},

Webpack is sucessfully compile all files but html-webpack-plugin does not append the generated files to the template (htmlWebpackPlugin.files.js is an empty array). It would be great to make it works with .mjs output files by default or with some flag in the configuration.
Expected result: the string <script type="module" src="main.mjs"></script> is appended in the template.

@jantimon
Copy link
Owner

Sure - could you please open a pull request?

@jantimon
Copy link
Owner

@levvsha any updates on this issue?

@artembatura
Copy link
Contributor

@jantimon Should be closed in #1207

@artembatura
Copy link
Contributor

@levvsha I don't sure that closing this issue now is good idea, because PR is not merged yet

@levvsha levvsha reopened this May 6, 2019
@levvsha
Copy link
Author

levvsha commented May 6, 2019

@artemirq Reopened.

@jantimon
Copy link
Owner

Can you please update #1207 so we can merge it?

@artembatura
Copy link
Contributor

@jantimon Sure

@jantimon
Copy link
Owner

Thanks al lot @artemirq - do you think we should also add unit tests?

@artembatura
Copy link
Contributor

@jantimon Thanks. I don't sure

@lock lock bot locked as resolved and limited conversation to collaborators Jun 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants