Webpack template: index.css file missing when packaged
See original GitHub issue- [✓] I have read the contribution documentation for this project.
- [✓] I agree to follow the code of conduct that this project follows, as appropriate.
- [✓] I have searched the issue tracker for an issue that matches the one I want to file, without success.
I updated to @electron-forge/plugin-webpack-6.0.0-beta.41 and build does not work anymore. It is reproducible just by trying this out on the webpack template. Steps to reproduce below. Everything runs without errors or warnings.
Console output when you run electron-forge
with the environment variable DEBUG=electron-forge:*
. (Instructions on how to do so here). Please include the stack trace if one exists.
This is the package output:
WARNING: DEBUG environment variable detected. Progress indicators will be sent over electron-forge:lifecycle
electron-forge:async-ora Process Started: Checking your system +0ms
electron-forge:check-system checking system, create ~/.skip-forge-system-check to stop doing this +0ms
electron-forge:async-ora Process Succeeded: Checking your system -- after 349ms +350ms
WARNING: DEBUG environment variable detected. Progress indicators will be sent over electron-forge:lifecycle
electron-forge:async-ora Process Started: Preparing to Package Application for arch: x64 +0ms
electron-forge:project-resolver searching for project in: /var/tmp/my-new-app +0ms
electron-forge:project-resolver electron-forge compatible package.json found in /var/tmp/my-new-app/package.json +2ms
electron-forge:require-search searching [ '@electron-forge/plugin-webpack',
'/var/tmp/my-new-app/@electron-forge/plugin-webpack',
'/var/tmp/my-new-app/node_modules/@electron-forge/plugin-webpack' ] relative to /var/tmp/my-new-app +0ms
electron-forge:require-search testing @electron-forge/plugin-webpack +1ms
electron-forge:plugin:webpack hooking process events +0ms
electron-forge:async-ora Process Started: Compiling Main Process Code +389ms
electron-forge:async-ora Process Succeeded: Compiling Main Process Code -- after 649ms +659ms
electron-forge:async-ora Process Started: Compiling Renderer Template +0ms
electron-forge:async-ora Process Succeeded: Compiling Renderer Template -- after 294ms +294ms
electron-forge:packager packaging with options { asar: false,
overwrite: true,
ignore: [Function],
dir: '/var/tmp/my-new-app',
arch: 'x64',
platform: 'linux',
afterCopy: [ [Function] ],
afterExtract: [ [Function] ],
afterPrune: [ [Function] ],
out: '/var/tmp/my-new-app/out',
electronVersion: '5.0.6',
quiet: true } +0ms
electron-forge:async-ora Process Succeeded: Preparing to Package Application for arch: x64 -- after 2.8s +1s
electron-forge:async-ora Process Started: Preparing native dependencies +1ms
electron-forge:async-ora Process Succeeded: Preparing native dependencies -- after 4ms +4ms
electron-forge:async-ora Process Started: Packaging Application +0ms
electron-forge:async-ora Process Succeeded: Packaging Application -- after 187ms +187ms
electron-forge:plugin:webpack handling process exit with: { cleanup: true } +3s
What does your config.forge
data in package.json
look like?
{
"packagerConfig": {},
"makers": [
{
"name": "@electron-forge/maker-squirrel",
"config": {
"name": "my_new_app"
}
},
{
"name": "@electron-forge/maker-zip",
"platforms": [
"darwin"
]
},
{
"name": "@electron-forge/maker-deb",
"config": {}
},
{
"name": "@electron-forge/maker-rpm",
"config": {}
}
],
"plugins": [
[
"@electron-forge/plugin-webpack",
{
"mainConfig": "./webpack.main.config.js",
"renderer": {
"config": "./webpack.renderer.config.js",
"entryPoints": [
{
"html": "./src/index.html",
"js": "./src/renderer.js",
"name": "main_window"
}
]
}
}
]
]
}
Please provide either a failing minimal testcase (with a link to the code) or detailed steps to
reproduce your problem. Using electron-forge init
is a good starting point, if that is not the
source of your problem.
npx create-electron-app my-new-app --template=webpack
cd my-new-app/
npm run package
./out/my-new-app-linux-x64/my-new-app
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Webpack template: index.css file missing when packaged #1030
It is reproducible just by trying this out on the webpack template. Steps to reproduce below. Everything runs without errors or warnings.
Read more >Production webpack build not finding CSS file - Stack Overflow
See here for how this works: https://github.com/ampedandwired/html-webpack-plugin#basic-usage new HtmlWebpackPlugin({ template: 'src/index.
Read more >css-loader | webpack - JS.ORG
webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable...
Read more >How to configure CSS Modules for webpack - LogRocket Blog
Our demo app has an src folder containing index.html , style.css , and index.js . ... Now, in the package.json file, we should...
Read more >html-webpack-template-pug - npm package - Snyk
Security Policy: No. We found a way for you to contribute to the project! Looks like html-webpack-template-pug is missing a security policy.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The
index.js
problem is confirmed and being tracked in https://github.com/electron-userland/electron-forge/issues/1034, please do not use this issue anymore.index.js
reference will be fixed in #1021.index.css
reference will be fixed in #1031 (although you can just remove the<link>
fromindex.html
).