-
Notifications
You must be signed in to change notification settings - Fork 23
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
Support typescript:main, module, and jsnext:main in package.json #109
Comments
Sounds fair |
This is especially nice if you're working across many modules. It lets you edit the source of a dependency and still get HMR without needing to run a build step in the middle. |
Fixed as of 0d7214b |
appsforartists/MidiConvert@6bdb7de Want to add it back to the TS preset for beta9? |
Readded as of 27420f8 |
Using this config in presets: [
[
require.resolve('pundle-preset-default'),
{
loader: false,
}
],
[
require.resolve('pundle-preset-typescript'),
{
resolver: {
packageMains: ['typescript:main', 'browser', 'main'],
},
transformer: {
extensions: ['js', 'jsx', 'ts', 'tsx'],
exclude: [],
config: {
compilerOptions: Object.assign(
mainTSConfig.compilerOptions,
tsConfig.compilerOptions
)
}
}
}
],
], Resolver is seeing this config: { alias: {},
extensions: null,
packageMains: [ 'browser', 'browserify', 'webpack', 'main' ],
modulesDirectories: [ 'node_modules' ],
knownExtensions: [ '', 'js', 'jsx', 'json', 'ts', 'tsx' ] } In all places that Moving the |
In addition to having |
Adding
|
I've put a working pundle configuration for your project in a gist. It doesn't look very nice right now, and is not the most pleasant thing to configure. I'm going to change that in the upcoming releases so the end user only has to specify I've opened #117 to track it |
Summary: Sharing `extensions` across config dictionaries as recommended by @steelbrain in steelbrain/pundle#109 Reviewers: O2 Material Motion, O3 Material JavaScript platform reviewers, #material_motion, steelbrain Reviewed By: steelbrain Subscribers: steelbrain Tags: #material_motion Differential Revision: http://codereview.cc/D2531
In
package.json
,main
refers to a file that uses CommonJS to handle importing/exporting other files. There are other standards for other module formats:For TypeScript,
typescript:main
For ES2015
import
/export
statements,module
andjsnext:main
The relevant Pundle presets (e.g. TypeScript and Babel) should prefer these keys by default.
The text was updated successfully, but these errors were encountered: