diff --git a/nuxt-speedkit.code-workspace b/nuxt-speedkit.code-workspace index c787d033c0..c2aaa1c47a 100644 --- a/nuxt-speedkit.code-workspace +++ b/nuxt-speedkit.code-workspace @@ -14,7 +14,7 @@ "editor.minimap.showSlider": "always", "editor.smoothScrolling": true, "editor.codeActionsOnSave": { - "source.fixAll": true + "source.fixAll": "explicit" }, "eslint.validate": [ "javascript", diff --git a/src/module.js b/src/module.js index dab8350f67..a9951b35e9 100644 --- a/src/module.js +++ b/src/module.js @@ -55,14 +55,14 @@ export default defineNuxtModule({ nuxt.hook( 'webpack:config', registerAppEntryWebpack( - resolve(nuxt.options.buildDir, MODULE_NAME, 'entry.js') + resolve(nuxt.options.buildDir, MODULE_NAME, 'entry.mjs') ) ); } else { nuxt.hook( 'vite:extend', registerAppEntryVite( - resolve(nuxt.options.buildDir, MODULE_NAME, 'entry.js') + resolve(nuxt.options.buildDir, MODULE_NAME, 'entry.mjs') ) ); } @@ -111,7 +111,7 @@ async function addBuildTemplates(nuxt, options) { ['client', 'server'].forEach(mode => { addPluginTemplate({ - src: resolver.resolve('runtime/tmpl', 'plugin.js'), + src: resolver.resolve('runtime/tmpl', 'plugin.mjs'), fileName: MODULE_NAME + `/plugin.${mode}.js`, write: true, mode, @@ -127,8 +127,8 @@ async function addBuildTemplates(nuxt, options) { }); addTemplate({ - src: resolver.resolve('runtime/tmpl', 'entry.js'), - fileName: MODULE_NAME + '/entry.js', + src: resolver.resolve('runtime/tmpl', 'entry.mjs'), + fileName: MODULE_NAME + '/entry.mjs', write: true, options: { webpack: isWebpackBuild(nuxt), diff --git a/src/runtime/tmpl/entry.js b/src/runtime/tmpl/entry.mjs similarity index 100% rename from src/runtime/tmpl/entry.js rename to src/runtime/tmpl/entry.mjs diff --git a/src/runtime/tmpl/plugin.js b/src/runtime/tmpl/plugin.mjs similarity index 100% rename from src/runtime/tmpl/plugin.js rename to src/runtime/tmpl/plugin.mjs