We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We're creating a web component that uses shadow dom. We're attempting to follow this setup for style-loader.
Unfortunately when we run
import styles from './stylesheet.css';
We are getting
export 'default' (imported as 'styles') was not found in './stylesheet.css' (module has no exports)
We don't get any errors when we run
import './stylesheet.css';
But we also get...nothing happening.
We need to be able to import the stylesheet under a given name so we can hook it into our webcomponent with
styles.use(this.shadowRoot);
Here is our encore config file.
/** @type {Encore} */ const Encore = require('@symfony/webpack-encore'); if (!Encore.isRuntimeEnvironmentConfigured()) { Encore.configureRuntimeEnvironment(process.env.NODE_ENV || 'dev'); } Encore.setOutputPath('../../public/embed-react/'); Encore.setPublicPath('/embed-react'); Encore.addEntry('embed-react', './embed-react.js'); Encore.enableTypeScriptLoader(); Encore.enableReactPreset(); Encore.enablePostCssLoader(config => { config.postcssOptions = { ...config.postcssOptions, plugins: [ ...(config.postcssOptions?.plugins ?? []), ['postcss-import', {}], ], }; }); Encore.configureBabel(config => { config.plugins.push('@babel/plugin-proposal-export-default-from'); config.plugins.push('@babel/plugin-proposal-optional-chaining'); config.plugins.push('@babel/plugin-proposal-nullish-coalescing-operator'); }); Encore.disableSingleRuntimeChunk(); Encore.cleanupOutputBeforeBuild(); Encore.enableSourceMaps(!Encore.isProduction()); Encore.configureStyleLoader(options => ({ ...options, injectType: 'lazyStyleTag', insert: function insertIntoTarget(element, options) { const parent = options.target || document.head; parent.appendChild(element); }, })); Encore.configureDevServerOptions(options => ({ ...options, allowedHosts: 'all', client: { webSocketURL: 'wss://localhost:8080/ws', }, https: { ...options.https, key: process.env.WEBPACK_KEY, cert: process.env.WEBPACK_CERT, }, })); const config = Encore.getWebpackConfig(); config.output.crossOriginLoading = 'anonymous'; config.resolve.fallback = {...config.resolve.fallback, fs: false}; config.parallelism = 10; module.exports = config;
The text was updated successfully, but these errors were encountered:
Thank you for this issue. There has not been a lot of activity here for a while. Has this been resolved?
Sorry, something went wrong.
No branches or pull requests
We're creating a web component that uses shadow dom.
We're attempting to follow this setup for style-loader.
Unfortunately when we run
We are getting
We don't get any errors when we run
But we also get...nothing happening.
We need to be able to import the stylesheet under a given name so we can hook it into our webcomponent with
Here is our encore config file.
The text was updated successfully, but these errors were encountered: