Closed flipkickmedia closed 2 years ago
I've isolated the issue. It appears that the sveltePreprocess config needed an additional statement to reloading work. Is it expected to build on the first run?
I am seeing additional output now from the build process about unused selectors so I assume it was working because the CSS was plain, only when it was seeing a postcss import on a rebuild would it fail.
const sveltePreprocess = require("svelte-preprocess");
const createSveltePreprocessor = () => {
return sveltePreprocess({
tsconfigFile: "tsconfig.json",
sourceMap: true,
postcss: true // this was missing from the config, adding this causes subsequent rebuilds to work correctly
});
};
module.exports = {
preprocess: createSveltePreprocessor(),
createSveltePreprocessor,
};
Win11+Webpack v5.68+svelte 3.64.3+tailwind 3.0.19+postcss 8.4.6+pnpm+node v16.13.2
A change to a component file located inside node_modules isn't being loaded correctly causing the css build to fail after the first run during
webpack serve
.The error is happening on a change to a file located inside node_modules during development - the logs should provide enough info on the structure. Im editing the file directly, Ive tried with npm.
the const css === undefined :(
The first run css has the correct css in it, on the second run it hasn't
The path to the css: "C:/Users/tbmst/Documents/svelte-template-webpack-
typescript/node_modules/.pnpm/git.flipkick.media+entitywind.io+svelte-component-panelbar@6370e35f6a4c236e1d58330e3d7ea3f6338a85ba/node_modules/svelte-component-panelbar/src/components/PanelBar.svelte.6.css"
The path looks wrong to me but I assume that's a virtual path. Is there any way to get this content actually written to disk?
webpack.config.js