Skip to content

Commit

Permalink
prepack module
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanSchndr committed May 12, 2022
1 parent 93f112e commit 3b2968f
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 11 deletions.
7 changes: 5 additions & 2 deletions dist/module.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
export * from '/Users/jonathan/Git/nuxt-fullpage/src/module';
export { default } from '/Users/jonathan/Git/nuxt-fullpage/src/module';
import * as _nuxt_schema from '@nuxt/schema';

declare const _default: _nuxt_schema.NuxtModule<_nuxt_schema.ModuleOptions>;

export { _default as default };
22 changes: 20 additions & 2 deletions dist/module.mjs
Original file line number Diff line number Diff line change
@@ -1,2 +1,20 @@
import jiti from 'jiti';
export default jiti(null, { interopDefault: true })('/Users/jonathan/Git/nuxt-fullpage/src/module');
import { resolve } from 'path';
import { fileURLToPath } from 'url';
import { defineNuxtModule, addPlugin } from '@nuxt/kit';

const module = defineNuxtModule({
meta: {
name: "@fullpage/nuxt-fullpage",
configKey: "@fullpage/nuxt-fullpage",
compatibility: {
nuxt: "^3.0.0"
}
},
setup(options, nuxt) {
const runtimeDir = fileURLToPath(new URL("./runtime", import.meta.url));
nuxt.options.build.transpile.push(runtimeDir);
addPlugin(resolve(runtimeDir, "plugin.client"));
}
});

export { module as default };
1 change: 0 additions & 1 deletion dist/runtime

This file was deleted.

3 changes: 3 additions & 0 deletions dist/runtime/plugin.client.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import 'vue-fullpage.js/dist/style.css';
declare const _default: any;
export default _default;
6 changes: 6 additions & 0 deletions dist/runtime/plugin.client.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { defineNuxtPlugin } from "#app";
import "vue-fullpage.js/dist/style.css";
import VueFullPage from "vue-fullpage.js";
export default defineNuxtPlugin((nuxtApp) => {
nuxtApp.vueApp.use(VueFullPage);
});
7 changes: 1 addition & 6 deletions dist/types.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@

import { ModuleOptions, ModuleHooks } from './module'
import { } from './module'

declare module '@nuxt/schema' {
interface NuxtConfig { ['@fullpage/nuxt-fullpage']?: Partial<ModuleOptions> }
interface NuxtOptions { ['@fullpage/nuxt-fullpage']?: ModuleOptions }
interface NuxtHooks extends ModuleHooks {}
}


export { default } from './module'

0 comments on commit 3b2968f

Please sign in to comment.