Giter Site home page Giter Site logo

Comments (3)

martinko2009 avatar martinko2009 commented on May 31, 2024

报错日志,如下:

Error: Child compilation failed:
Module build failed: SyntaxError: D:/multipage/assets/components/skeleton/lib/entry-skeleton.js: Unexpected token (1:8)

> 1 | import s{
    |         ^
  2 |             path: '/skeleton-welcome/welcome',
  3 |             name: 'skeleton-welcome/welcome',
  4 |             component: _15304950479044526b78913c1aab4524492713e5a560a
:
BabelLoaderError: SyntaxError: D:/multipage/assets/components/skeleton/lib/entry-skeleton.js: Unexpected token (1:8)

> 1 | import s{
    |         ^
  2 |             path: '/skeleton-welcome/welcome',
  3 |             name: 'skeleton-welcome/welcome',
  4 |             component: _15304950479044526b78913c1aab4524492713e5a560a

    at D:\multipage\node_modules\vue-skeleton-webpack-plugin\lib\ssr.js:89:24
    at compile (D:\multipage\node_modules\webpack\lib\Compiler.js:300:11)
    at applyPluginsAsync.err (D:\multipage\node_modules\webpack\lib\Compiler.js:510:14)
    at next (D:\multipage\node_modules\tapable\lib\Tapable.js:202:11)
    at Compiler.<anonymous> (D:\multipage\node_modules\webpack\lib\CachePlugin.js:78:5)
    at Compiler.applyPluginsAsyncSeries (D:\multipage\node_modules\tapable\lib\Tapable.js:206:13)
    at compilation.seal.err (D:\multipage\node_modules\webpack\lib\Compiler.js:507:11)
    at Compilation.applyPluginsAsyncSeries (D:\multipage\node_modules\tapable\lib\Tapable.js:195:46)
    at applyPluginsAsync.err (D:\multipage\node_modules\webpack\lib\Compilation.js:683:19)
    at Compilation.applyPluginsAsyncSeries (D:\multipage\node_modules\tapable\lib\Tapable.js:195:46)
    at applyPluginsAsync.err (D:\multipage\node_modules\webpack\lib\Compilation.js:674:11)
    at Compilation.applyPluginsAsyncSeries (D:\multipage\node_modules\tapable\lib\Tapable.js:195:46)
    at applyPluginsAsync.err (D:\multipage\node_modules\webpack\lib\Compilation.js:669:10)
    at next (D:\multipage\node_modules\tapable\lib\Tapable.js:202:11)
    at Compilation.<anonymous> (D:\multipage\node_modules\extract-text-webpack-plugin\dist\index.js:275:11)
    at Compilation.applyPluginsAsyncSeries (D:\multipage\node_modules\tapable\lib\Tapable.js:206:13)

from vue-skeleton-webpack-plugin.

xiaoiver avatar xiaoiver commented on May 31, 2024

谢谢你的反馈,如果不需要这部分,可以直接从 module 中删除,也就是整个 SkeletonWebpackPlugin.loader 部分:

// webpack.config.js

module: {
        rules: utils.styleLoaders({
            sourceMap: false,
            extract: true
        })
// 删掉下面的配置
.concat(SkeletonWebpackPlugin.loader({
            include: [
                resolve('src/pages/page1/entry.js'),
                resolve('src/pages/page2/entry.js')
            ],
            options: {
                entry: ['page1', 'page2'],
                routePathTemplate: '/[name]-skeleton',
                insertAfter: 'routes: [',
                importTemplate: 'import [name] from \'./[name].skeleton.vue\';'
            }
        }))
    },

from vue-skeleton-webpack-plugin.

xiaoiver avatar xiaoiver commented on May 31, 2024

@martinko2009 1.2.1 版本之后已经支持了开发模式的 hot reload,所以可以移除 SkeletonWebpackPlugin.loader 这部分配置了。

from vue-skeleton-webpack-plugin.

Related Issues (20)

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.