Git Product home page Git Product logo

offline-package-webpack-plugin's Issues

vite 里使用hash路由方式做离线包问题咨询?

目前我们启动server在客户端内访问正常,使用file://协议加载本地html也是正常,但是存在路由问题,即我访问超过3页,点击返回它会返回到第一页,实际它返回到了第三页再返回到了第一页,通过查询window.history.state.position可以看到层级变化。
A(push) > B(replace) > C(push) > D(调用router.go(-1)) server访问D返回C。本地:D返回C然后又返回到了A。视觉上看着是D返回到了A,C页面打印的log查看到,其实返回到了C,C没有返回上一页的逻辑。

问下是否有同学解决该问题。

插件使用了 vite版本的“vite-plugin-offline-package”,主要是改造了webpack版:offline-package-webpack-plugin

Cannot read property 'emit' of undefined

webpack 版本为3.6.0 使用这个插件报以下错误

TypeError: Cannot read property 'emit' of undefined
at OfflinePackagePlugin.apply (/Users/vue-acts/2020/06/cloundTravel/node_modules/offline-package-webpack-plugin/lib/plugin.js:41:20)
at Compiler.apply (/Users/vue-acts/2020/06/cloundTravel/node_modules/tapable/lib/Tapable.js:375:16)
at webpack (/Users/vue-acts/2020/06/cloundTravel/node_modules/webpack/lib/webpack.js:33:19)
at Object.
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.