Giter Club home page Giter Club logo

Comments (5)

baiwusanyu-c avatar baiwusanyu-c commented on May 29, 2024

Sorry, haven't used webpack for a long time, can you provide a minimal repo to reproduce?

from unplugin-vue-ce.

baiwusanyu-c avatar baiwusanyu-c commented on May 29, 2024

I did find some problems when I ran it in vue-cli, but the error I got was different from yours. I'm not sure what the reason is, but I still made some changes based on my error. I don't know if it will solve yours problem

from unplugin-vue-ce.

ThornWalli avatar ThornWalli commented on May 29, 2024

@baiwusanyu-c Have prepared a repo. there you can repoduce it.

Gives an error with the plugin html-webpack-plugin.

https://github.com/ThornWalli/webpack-sub-style-test

assets by status 65.6 KiB [cached] 2 assets
orphan modules 337 KiB [orphan] 15 modules
runtime modules 221 bytes 1 module
cacheable modules 335 KiB
  ./src/entry.js + 12 modules 335 KiB [built] [code generated]
  ./node_modules/vue-loader/dist/exportHelper.js 328 bytes [built] [code generated]

ERROR in   Error: Child compilation failed:
  Module parse failed: Unexpected token (1:0)
  File was processed with these loaders:
   * ./node_modules/unplugin/dist/webpack/loaders/transform.js
   * ./node_modules/html-webpack-plugin/lib/loader.js
   * ./node_modules/unplugin/dist/webpack/loaders/load.js
   * ./node_modules/unplugin/dist/webpack/loaders/transform.js
  You may need an additional loader to handle the result of these loaders.
  > <!DOCTYPE html>
  | <html>
  |   <head>
  ModuleParseError: Module parse failed: Unexpected token (1:0)
  File was processed with these loaders:
   * ./node_modules/unplugin/dist/webpack/loaders/transform.js
   * ./node_modules/html-webpack-plugin/lib/loader.js
   * ./node_modules/unplugin/dist/webpack/loaders/load.js
   * ./node_modules/unplugin/dist/webpack/loaders/transform.js
  You may need an additional loader to handle the result of these loaders.
  > <!DOCTYPE html>
  | <html>
  |   <head>
      at handleParseError (xxx/webpack-sub-style-test/node_modules/webpack/lib/NormalModule.js:982:19)
      at xxx/webpack-sub-style-test/node_modules/webpack/lib/NormalModule.js:1101:5
      at processResult (xxx/webpack-sub-style-test/node_modules/webpack/lib/NormalModule.js:806:11)
      at xxx/webpack-sub-style-test/node_modules/webpack/lib/NormalModule.js:866:5
      at xxx/webpack-sub-style-test/node_modules/loader-runner/lib/LoaderRunner.js:407:3
      at iterateNormalLoaders (xxx/webpack-sub-style-test/node_modules/loader-runner/lib/LoaderRunner.js:233:10)
      at iterateNormalLoaders (xxx/webpack-sub-style-test/node_modules/loader-runner/lib/LoaderRunner.js:240:10)
      at xxx/webpack-sub-style-test/node_modules/loader-runner/lib/LoaderRunner.js:255:3
      at context.callback (xxx/webpack-sub-style-test/node_modules/loader-runner/lib/LoaderRunner.js:124:13)
      at Object.transform (xxx/webpack-sub-style-test/node_modules/unplugin/dist/webpack/loaders/transform.js:101:5)
  
  - NormalModule.js:982 handleParseError
    [webpack-sub-style-test]/[webpack]/lib/NormalModule.js:982:19
  
  - NormalModule.js:1101 
    [webpack-sub-style-test]/[webpack]/lib/NormalModule.js:1101:5
  
  - NormalModule.js:806 processResult
    [webpack-sub-style-test]/[webpack]/lib/NormalModule.js:806:11
  
  - NormalModule.js:866 
    [webpack-sub-style-test]/[webpack]/lib/NormalModule.js:866:5
  
  - LoaderRunner.js:407 
    [webpack-sub-style-test]/[loader-runner]/lib/LoaderRunner.js:407:3
  
  - LoaderRunner.js:233 iterateNormalLoaders
    [webpack-sub-style-test]/[loader-runner]/lib/LoaderRunner.js:233:10
  
  - LoaderRunner.js:240 iterateNormalLoaders
    [webpack-sub-style-test]/[loader-runner]/lib/LoaderRunner.js:240:10
  
  - LoaderRunner.js:255 
    [webpack-sub-style-test]/[loader-runner]/lib/LoaderRunner.js:255:3
  
  - LoaderRunner.js:124 context.callback
    [webpack-sub-style-test]/[loader-runner]/lib/LoaderRunner.js:124:13
  
  - transform.js:101 Object.transform
    [webpack-sub-style-test]/[unplugin]/dist/webpack/loaders/transform.js:101:5
  
  - child-compiler.js:169 
    [webpack-sub-style-test]/[html-webpack-plugin]/lib/child-compiler.js:169:18
  
  - Compiler.js:551 finalCallback
    [webpack-sub-style-test]/[webpack]/lib/Compiler.js:551:5
  
  - Compiler.js:577 
    [webpack-sub-style-test]/[webpack]/lib/Compiler.js:577:11
  
  - Compiler.js:1200 
    [webpack-sub-style-test]/[webpack]/lib/Compiler.js:1200:17
  
  
  - Hook.js:18 Hook.CALL_ASYNC_DELEGATE [as _callAsync]
    [webpack-sub-style-test]/[tapable]/lib/Hook.js:18:14
  
  - Compiler.js:1196 
    [webpack-sub-style-test]/[webpack]/lib/Compiler.js:1196:33
  
  - Compilation.js:2795 finalCallback
    [webpack-sub-style-test]/[webpack]/lib/Compilation.js:2795:11
  
  - Compilation.js:3100 
    [webpack-sub-style-test]/[webpack]/lib/Compilation.js:3100:11
  

1 ERROR in child compilations (Use 'stats.children: true' resp. '--stats-children' for more details)
client (webpack 5.88.2) compiled with 2 errors in 4766 ms

from unplugin-vue-ce.

baiwusanyu-c avatar baiwusanyu-c commented on May 29, 2024

This bug comes from unplugin. Installing the latest version of unplugin-vue-ce should avoid this bug

from unplugin-vue-ce.

ThornWalli avatar ThornWalli commented on May 29, 2024

Works! Thank you!

from unplugin-vue-ce.

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.