Skip to content

Commit

Permalink
fix(module): fix missing mjs files
Browse files Browse the repository at this point in the history
  • Loading branch information
ThornWalli committed Dec 14, 2023
1 parent bdad83c commit 7ed3467
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion nuxt-speedkit.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"editor.minimap.showSlider": "always",
"editor.smoothScrolling": true,
"editor.codeActionsOnSave": {
"source.fixAll": true
"source.fixAll": "explicit"
},
"eslint.validate": [
"javascript",
Expand Down
10 changes: 5 additions & 5 deletions src/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
)
);
}
Expand Down Expand Up @@ -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,
Expand All @@ -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),
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 7ed3467

Please sign in to comment.