Update webpack

This commit is contained in:
Daniel Supernault 2023-06-11 16:47:23 -06:00
parent 1f6d11736a
commit 7217c962bf
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7
4 changed files with 89 additions and 57 deletions

View file

@ -116,13 +116,13 @@ const ProfileFollowersComponent = () => import(/* webpackChunkName: "profile~fol
const ProfileFollowingComponent = () => import(/* webpackChunkName: "profile~following.bundle" */ "./../components/ProfileFollowing.vue"); const ProfileFollowingComponent = () => import(/* webpackChunkName: "profile~following.bundle" */ "./../components/ProfileFollowing.vue");
const HashtagComponent = () => import(/* webpackChunkName: "discover~hashtag.bundle" */ "./../components/Hashtag.vue"); const HashtagComponent = () => import(/* webpackChunkName: "discover~hashtag.bundle" */ "./../components/Hashtag.vue");
const NotFoundComponent = () => import(/* webpackChunkName: "error404.bundle" */ "./../components/NotFound.vue"); const NotFoundComponent = () => import(/* webpackChunkName: "error404.bundle" */ "./../components/NotFound.vue");
const HelpComponent = () => import(/* webpackChunkName: "help.bundle" */ "./../components/HelpComponent.vue"); // const HelpComponent = () => import(/* webpackChunkName: "help.bundle" */ "./../components/HelpComponent.vue");
const KnowledgebaseComponent = () => import(/* webpackChunkName: "kb.bundle" */ "./../components/Knowledgebase.vue"); // const KnowledgebaseComponent = () => import(/* webpackChunkName: "kb.bundle" */ "./../components/Knowledgebase.vue");
const AboutComponent = () => import(/* webpackChunkName: "about.bundle" */ "./../components/About.vue"); // const AboutComponent = () => import(/* webpackChunkName: "about.bundle" */ "./../components/About.vue");
const ContactComponent = () => import(/* webpackChunkName: "contact.bundle" */ "./../components/Contact.vue"); // const ContactComponent = () => import(/* webpackChunkName: "contact.bundle" */ "./../components/Contact.vue");
const LanguageComponent = () => import(/* webpackChunkName: "i18n.bundle" */ "./../components/Language.vue"); const LanguageComponent = () => import(/* webpackChunkName: "i18n.bundle" */ "./../components/Language.vue");
const PrivacyComponent = () => import(/* webpackChunkName: "static~privacy.bundle" */ "./../components/Privacy.vue"); // const PrivacyComponent = () => import(/* webpackChunkName: "static~privacy.bundle" */ "./../components/Privacy.vue");
const TermsComponent = () => import(/* webpackChunkName: "static~tos.bundle" */ "./../components/Terms.vue"); // const TermsComponent = () => import(/* webpackChunkName: "static~tos.bundle" */ "./../components/Terms.vue");
const ChangelogComponent = () => import(/* webpackChunkName: "changelog.bundle" */ "./../components/Changelog.vue"); const ChangelogComponent = () => import(/* webpackChunkName: "changelog.bundle" */ "./../components/Changelog.vue");
// import LiveComponent from "./../components/Live.vue"; // import LiveComponent from "./../components/Live.vue";
@ -234,42 +234,42 @@ const router = new VueRouter({
path: "/i/web/direct", path: "/i/web/direct",
component: DirectComponent component: DirectComponent
}, },
{ // {
path: "/i/web/kb/:id", // path: "/i/web/kb/:id",
name: "kb", // name: "kb",
component: KnowledgebaseComponent, // component: KnowledgebaseComponent,
props: true // props: true
}, // },
{ {
path: "/i/web/hashtag/:id", path: "/i/web/hashtag/:id",
name: "hashtag", name: "hashtag",
component: HashtagComponent, component: HashtagComponent,
props: true props: true
}, },
{ // {
path: "/i/web/help", // path: "/i/web/help",
component: HelpComponent // component: HelpComponent
}, // },
{ // {
path: "/i/web/about", // path: "/i/web/about",
component: AboutComponent // component: AboutComponent
}, // },
{ // {
path: "/i/web/contact", // path: "/i/web/contact",
component: ContactComponent // component: ContactComponent
}, // },
{ {
path: "/i/web/language", path: "/i/web/language",
component: LanguageComponent component: LanguageComponent
}, },
{ // {
path: "/i/web/privacy", // path: "/i/web/privacy",
component: PrivacyComponent // component: PrivacyComponent
}, // },
{ // {
path: "/i/web/terms", // path: "/i/web/terms",
component: TermsComponent // component: TermsComponent
}, // },
{ {
path: "/i/web/whats-new", path: "/i/web/whats-new",
component: ChangelogComponent component: ChangelogComponent

4
resources/assets/js/stories.js vendored Normal file
View file

@ -0,0 +1,4 @@
Vue.component(
'story-viewer',
require('./components/StoryViewer.vue').default
);

29
resources/assets/sass/lib/manrope.scss vendored Normal file
View file

@ -0,0 +1,29 @@
/* latin */
@font-face {
font-family: 'Manrope';
font-style: normal;
font-weight: 200;
font-display: swap;
src: url(/fonts/xn7gYHE41ni1AdIRggexSvfedN4.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin */
@font-face {
font-family: 'Manrope';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(/fonts/xn7gYHE41ni1AdIRggexSvfedN4.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin */
@font-face {
font-family: 'Manrope';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url(/fonts/xn7gYHE41ni1AdIRggexSvfedN4.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

49
webpack.mix.js vendored
View file

@ -2,7 +2,7 @@ let mix = require('laravel-mix');
const fs = require("fs"); const fs = require("fs");
mix.before(() => { mix.before(() => {
fs.rmSync('public/js', { recursive: true, force: true }); fs.rmSync('public/js', { recursive: true, force: true });
}); });
@ -34,7 +34,6 @@ mix.js('resources/assets/js/app.js', 'public/js')
.js('resources/assets/js/spa.js', 'public/js') .js('resources/assets/js/spa.js', 'public/js')
.js('resources/assets/js/stories.js', 'public/js') .js('resources/assets/js/stories.js', 'public/js')
.js('resources/assets/js/portfolio.js', 'public/js') .js('resources/assets/js/portfolio.js', 'public/js')
.js('resources/assets/js/installer.js', 'public/js')
.js('resources/assets/js/admin_invite.js', 'public/js') .js('resources/assets/js/admin_invite.js', 'public/js')
.js('resources/assets/js/landing.js', 'public/js') .js('resources/assets/js/landing.js', 'public/js')
.vue({ version: 2 }); .vue({ version: 2 });
@ -45,31 +44,31 @@ mix.version();
const TerserPlugin = require('terser-webpack-plugin'); const TerserPlugin = require('terser-webpack-plugin');
mix.options({ mix.options({
processCssUrls: false, processCssUrls: false,
terser: { terser: {
parallel: true, parallel: true,
terserOptions: { terserOptions: {
compress: true, compress: true,
output: { output: {
comments: false comments: false
} }
} }
} }
}) })
mix.webpackConfig({ mix.webpackConfig({
optimization: { optimization: {
providedExports: false, providedExports: false,
sideEffects: false, sideEffects: false,
usedExports: false, usedExports: false,
minimize: true, minimize: true,
minimizer: [ new TerserPlugin({ minimizer: [ new TerserPlugin({
extractComments: false, extractComments: false,
})] })]
}, },
output: { output: {
chunkFilename: 'js/[name].[chunkhash].js', chunkFilename: 'js/[name].[chunkhash].js',
} }
}); });
mix.autoload({ mix.autoload({
jquery: ['$', 'jQuery', 'window.jQuery'] jquery: ['$', 'jQuery', 'window.jQuery']
}); });