Webpack

Laravel Vue Non SPA - How to split the files for every page for its vue js components?

不问归期 提交于 2021-02-18 13:00:10
问题 My application is using laravel vue but not SPA,.. so im still using laravel blades to separate the pages. Every page are importing app.js. My App.js is compiled by webpack and all my vue components are compiled on that file. so the problem is the app.js getting MB size and the every page will slow to load that file. Is their way to split the code of vuejs or separate the file for every pages using webpack? this is my webpack.js in my web application. const mix = require('laravel-mix'); /* |-

sockjs-node/info? 404 (Not Found)

纵饮孤独 提交于 2021-02-18 11:14:45
问题 I've done lost of search for couple of hours now and still can't find what I'm looking for. Basically I get this error in the console when running ng serve in my Angular 6 app : GET http://local.mywebsitesecure.com/sockjs-node/info?t=1540568455931 404 (Not Found) Based on my research the solution could be just updating webpack.config.js However, I can't find webpack.config.js in my project. They also say to do: "ng eject" to create a webpack, but it doesn't seem to work. SOLUTION: I can get

sockjs-node/info? 404 (Not Found)

心不动则不痛 提交于 2021-02-18 11:14:09
问题 I've done lost of search for couple of hours now and still can't find what I'm looking for. Basically I get this error in the console when running ng serve in my Angular 6 app : GET http://local.mywebsitesecure.com/sockjs-node/info?t=1540568455931 404 (Not Found) Based on my research the solution could be just updating webpack.config.js However, I can't find webpack.config.js in my project. They also say to do: "ng eject" to create a webpack, but it doesn't seem to work. SOLUTION: I can get

年中了,为何有人涨薪,有人被优化

纵然是瞬间 提交于 2021-02-18 09:56:41
小孩子的6月只有儿童节,而成年人的6月则少不了年中总结。 回想 2020 年的上半年,每个人都不容易,畅想过的跳槽、升职、加薪,都在疫情中被迫终止。但即使再难这一年也已过半,回顾这半年: 如果没有疫情,你的简历够得上更好的待遇吗? 毕竟对前端人来说,什么时候都很难。技术框架层出不穷、应用场景越来越复杂,从前端到跨端。紧赶慢赶地学新东西,可公司的工作也就是那些。 学了耗费精力,不知道啥时候用得上,不学的话,也不知道啥时候用得上。 那些技术大牛,在 GitHub 上有开源项目的人,也未必多么有天赋,只是掌握了正确的学习方法且把学习到的内容应用到了实战而已。 所以掌握了正确的学习方法,其实你也可以。 又到了 6·18 剁手的时候,如果你有精力不妨看看 拉勾教育的 6·18 年中知识特惠 ,1元可以秒杀前端重磅好课, 技术大牛的经验复用,面试技巧的模拟演练,带你用最小的成本为自己“增值”。 (肯定要人说我这是广告,但这种 1 元买98元好课的广告,我愿意接到广告主破产 ) *我的专属福利:在我这里购买专栏,还可以额外再领取一门拉勾教育的专栏。 1元秒杀专栏 训练营5折起 1元秒杀|原价 ¥98 的「前端高手进阶」 重磅推荐:《前端高手进阶》 这个专栏 会从底层的知识讲起,带你掌握前端的底层原理,配合实际工作中的案例分析,帮你建立一套前端知识框架,面对再多的知识点也不显得杂乱

Ignoring specific require()s in Webpack?

只谈情不闲聊 提交于 2021-02-18 08:01:42
问题 I have a library interoperable with NodeJS and the Browser and both are being run through Webpack to produce the final bundle. The issue I'm running into is Webpack will rewrite all require() statements to __webpack_require__() and try to bundle the library, which doesn't work for things like fs and worker_threads . How do I make it ignore certain require() s and related mechanisms ( require.resolve() , import , etc) given a specific input string? I've read that I can use the webpack

Ignoring specific require()s in Webpack?

本小妞迷上赌 提交于 2021-02-18 08:01:10
问题 I have a library interoperable with NodeJS and the Browser and both are being run through Webpack to produce the final bundle. The issue I'm running into is Webpack will rewrite all require() statements to __webpack_require__() and try to bundle the library, which doesn't work for things like fs and worker_threads . How do I make it ignore certain require() s and related mechanisms ( require.resolve() , import , etc) given a specific input string? I've read that I can use the webpack

webpack-dev-server how to reload css without page refresh

半城伤御伤魂 提交于 2021-02-18 06:47:08
问题 When I change styles in my .vue files and .css files, I dont' want the page to refresh, and I want the style auto change. But now page always refresh when I change the styles. I'm using the vue-cli to generate the webpack config file. as below webpack.dev.conf.js const devWebpackConfig = merge(baseWebpackConfig, { module: { rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap, usePostCSS: false }) }, // cheap-module-eval-source-map is faster for development devtool: config.dev

push assets folder to public directory with webpack

删除回忆录丶 提交于 2021-02-18 04:56:31
问题 I'm using Webpack for the first time. Currently everything is being served up quite nicely. My problem is when I'm trying to build a dist folder. Currently I get my index.html and bundle.js files but I can't figure out how to push my assets to the dist folder. I have file-loader loaded up but it doesn't actually seem to do what I want it to and none of the google searches I've run are telling me what I need to know. Below is my config file. Can someone lead a horse to water? Also once I get

Webpack5 Automatic publicPath is not supported in this browser

泄露秘密 提交于 2021-02-18 03:42:13
问题 I was working on webpack 4.44.2, I face this error when I convert to webpack5.0.0 ERROR in ./src/assets/sass/styles.scss Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js): Error: Automatic publicPath is not supported in this browser at E:\maktab\Control-panel\newcontrol\final-control\node_modules\css-loader\dist\cjs.js! the error is from the font file bath in fonts.scss @font-face { font-family: "Janna LT"; src: local("Janna LT"), url(../fonts/janna.woff) format

json-loader in webpack.config.js not working

点点圈 提交于 2021-02-18 01:43:54
问题 I'm trying to follow a react tutorial, My webpack.config.js file is as follows: var webpack = require("webpack"); var pth = require("path"); module.exports = { entry: "./src/index.js", output: { path: __dirname + "/dist", filename: "bundle.js" }, devServer: { inline: true, contentBase: './dist', port: 3000 }, module: { rules: [ { test: /\.js$/, exclude: /(node_modules)/, use: 'babel-loader' }, { test: /\.json$/, exclude: /(node_modules)/, use: 'json-loader' } ] } } While my Code files are as