Comments (5)
Sorry, haven't used webpack for a long time, can you provide a minimal repo to reproduce?
from unplugin-vue-ce.
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.
@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.
This bug comes from unplugin. Installing the latest version of unplugin-vue-ce should avoid this bug
from unplugin-vue-ce.
Works! Thank you!
from unplugin-vue-ce.
Related Issues (20)
- Tailwind styles missing in sub-style
- createCEApp instance like createApp, is it possible? HOT 1
- Sourcemap point to missing source files HOT 2
- [feat requeset] Support `:host` selector
- How to use switch shadow? HOT 2
- When importing the same component twice, the styles only apply to the first one. HOT 7
- styles are missing when using defineAsyncComponent within vue file HOT 2
- 2x nested defineAsyncComponent HOT 1
- Problem with build of `webpack` and `vite` in one node instance. HOT 4
- ERROR: [plugin: externalize-deps] Failed to resolve entry for package "unplugin-vue-ce". HOT 3
- Vue 3 CLI Webpack 5 error on custom web component build
- Dependency Dashboard
- "Component is missing template or render function" when using in Vite's library mode. HOT 4
- [BUG] - Style tags not added when using externals HOT 7
- [BUG] - Multiple CE instances style breaking when 1st CE removed from the DOM HOT 7
- [BUG] - CE component styles are removed too early when using Transition HOT 1
- [BUG] - ES modules import "./some-lib.css" seems not to end up in the shadow-root HOT 7
- [BUG] - Web Component crashes when calling inject-api-custom-element.ts HOT 1
- [BUG] - Sub components style tags not added in Storybook HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unplugin-vue-ce.