Giter Club home page Giter Club logo

lwc-webpack-plugin's People

Contributors

davidturissini avatar gonzalocordero avatar mrigdon-zz avatar reiniergs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

lwc-webpack-plugin's Issues

Could this be used to with lightning-base-components?

Trying to figure out if it's possible to bundle the lightning-base-components with an application (specifically seeing if I can get it to work with a react app).

I tried something like this in my webpack config:

new LWCWebpackPlugin({
        namespace: {
          // LWC Namespace with path
          lightning: path.resolve(root, 'node_modules/lightning-base-components/src/lightning')
        },
        // NPM modules
        modules: [
          '@salesforce-ux/design-system',
        ]
}),

Was hoping this would let me reference the components via something like this:

<lightning-button
        label="Neutral"
        title="Non-primary action"
        onclick={() => console.log('abc')}
        class="slds-m-left_x-small"
></lightning-button>

Feature Request: Auto Append SLDS CSS

Short
Since the a major use of this will be to handle work done in and around the Salesforce ecosystem, I'd like to request a way to append the slds imprort in each component.

Long
On sfdc platform, all components automatically receive access to the Salesforce Design System css. I believe this is because sfdc doesn't actually use the shadow dom, but a polyfill for it. This presents an issues in that the OSS lwc version does use shadow DOM. I'd like to style my compoents using
the slds without having to manually add the css to each component.

Work Around
For those components, that don't have css file. I update the empty.css to include a slds import( as demonstrated in the example). This works for components without css but doesn't for those that do.

Can't resolve css imports

Running the example I get the following error:

Module not found: Error: Can't resolve '@salesforce/slds/common' in '/Users/gcordero/dist/lwc-webpack-plugin/example/src/my/app'

@reiniergs

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.