Skip to content
New issue

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

Need help with webpack building #1301

Closed
v15h9 opened this issue Mar 5, 2018 · 1 comment
Closed

Need help with webpack building #1301

v15h9 opened this issue Mar 5, 2018 · 1 comment

Comments

@v15h9
Copy link

v15h9 commented Mar 5, 2018

When building with webpack, I receive the below error. Any help or guidance that can be provided to overcome this will be usefule

image

My Webpack config is as follows:
`const { join } = require( "path" ),
webpack = require( "webpack" );

module.exports = {
entry: join( __dirname, "app/renderer.jsx" ),
target: "electron-renderer",
output: {
path: join( __dirname, "app/build" ),
filename: "renderer.js"
},
module: {
rules: [
{
test: /.jsx?$/,
exclude: /node_modules/(?![@salesforce])/,
use: [{
loader: "babel-loader",
options: {
presets: [ "env", "react"],
plugins: [ "transform-class-properties" ]
}
}]
}
]
}
}; `

@interactivellama
Copy link
Contributor

interactivellama commented Mar 5, 2018

The library source code requires more plugins than that: babel-plugin-transform-export-extensions

See https://github.com/salesforce/design-system-react#transpile-with-babelrc-settings
You'll want 1.x of the preset. 2.x is not compatible with the library right now, but should be soon. See #1300 for more details about that. The source code for the 1.x preset is here:
https://github.com/salesforce/design-system-react/blob/master/preset/index.js

Reopen if that's not the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants