Comments (13)
Ooh, I can also confirm that if I change my .css.ts
file to .vss.ts
and import it as File.vss
- then it is correctly inlined. So I think that should more or less narrow it down to packemon handling .css
in a weird way.
from packemon.
@SlexAxton I just released 4.0.0-alpha.0, can you give that a shot?
from packemon.
I think the fact is that './Link.css'
being a TS file under the hood is just bad design on their part. I'm not sure there's an easy way around this from Packemon's side, so I think I'll just add a setting to disable the asset stuff.
from packemon.
Potential middle ground would be control over that constant of asset file extensions.
from packemon.
I haven't changed any configuration, but by default I still have the same issue:
Is there a flag or something I need to add?
from packemon.
task is:
type: 'library'
language: 'typescript'
tasks:
build:
command:
- 'packemon'
- 'pack'
- '--addEngines'
- '--declaration'
inputs:
- '@globs(sources)'
- 'package.json'
- 'tsconfig.*.json'
outputs:
- 'esm'
from packemon.
Whats the content of one of these css files, so I can test it thoroughly
from packemon.
Minimum viable .css.ts file is gonna be something like:
style.css.ts
import {style} from '@vanilla-extract/css';
export const redText = style({
color: 'red',
});
Component.tsx
import {redText} from './style.css';
export const MyComponent = (props) => (
<div className={redText} {...props} />
);
packemon.config.js
Then technically we'd also want to make sure these got built at build time. I have this configured, but it fails for the same reason with or without this configuration at the moment.
const {vanillaExtractPlugin} = require('@vanilla-extract/rollup-plugin');
module.exports = {
rollupInput(config) {
config.plugins.unshift(vanillaExtractPlugin());
},
};
Result
The resulting build output without the plugin added should just be the .css.ts
file is inlined as a module just like other .ts
files.
The resulting build output with the plugin should more or less replace the contents of style.css.ts
with:
export const redText = 'redtextclass-982398';
and then the rollup file also ends up generating a css output file at like esm/assets/src/style.css.ts.vanilla.css
and it would have something like:
.redtextclass-982398 {color:red}
from packemon.
Thanks, will give this a shot.
from packemon.
Figured this out, will release shortly #240
from packemon.
Released 4.0.0-alpha.2
from packemon.
Fixed in v4
from packemon.
from packemon.
Related Issues (20)
- any way to add rollup plugins? HOT 2
- Sourcemaps don't seem to be generated correctly
- clean command is not working HOT 1
- "helpers" feature not removing babelHelpers HOT 2
- [Docs] Meaning of directory name colors of `npx packemon files` HOT 1
- UNLICENSED package cannot pass license validation HOT 1
- Is it possible to disable asset imports? HOT 3
- "default" is imported from external module "react" but never used in "src/file.tsx" HOT 10
- Add configuration options as parameters to `scaffold` HOT 2
- packemon 4 version is still `0.0.0-internal` HOT 4
- [4.0] Scaffold for polyrepo generates `tsconfig.build.json` but looks for `tsconfig.mjs.json` HOT 1
- [4.0] Packemon ignores tsconfig `outDir` HOT 12
- Question/Feature Request: How to replace the build step? HOT 6
- '--loadConfigs' does not load Babel plugins specified in babel.config.json HOT 8
- Types *must* be imported with `type` keyword when TS `compilerOptions.verbatimModuleSyntax` is `true`
- Declarations not included and Types not satisifed by inclusion of src (broken sourcemaps) HOT 2
- Add the `@babel/plugin-syntax-import-attributes` plugin to allow JSON imports with type assertion HOT 3
- MJS wrappers of ./cjs/subdir/*.js are incorrectly created at ./cjs/*-wrapper.mjs HOT 2
- Scan package lock file (or deps?) for highest minimum engine requirements for --addEngines HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from packemon.